So, here is what I know:
logs property with a url.##[error] corresponds to an error logged on the build summary page.I am curious if this is the best way to do it if I only need to get the build errors. I do not need the whole log.
You can also use the Build Timeline API and check the results there if there is an errors.
The API response contains the property issues, so just check if it's not null and print the issue message.
For example (in PowerShell):
# Get here the response from the api
$response = Invoke-RestMethod ......
$errors = $response.records.Where({ $_.issues -ne $null })
$errors.ForEach({
# Task name
$_.name
# Error message
$_.issues.ForEach({ $_.message })
})
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With