1
votes

I see there's an REST endpoint to get the log by its ID ( https://docs.microsoft.com/en-us/rest/api/azure/devops/build/builds/get%20build%20log?view=azure-devops-rest-5.1 )

And from what I see there's a log for each step and then the last log contains all steps. Is this always how the response will be? Is this documented somewhere that last log will always be the full log?

And is there a way to know which log to get for the stage the failed the build? As I would need only the one that caused the build to fail and not all of them.

1

1 Answers

1
votes

No, there is no such kind of way to achieve what you need in Azure DevOps Service at present.

And from what I see there's a log for each step and then the last log contains all steps. Is this always how the response will be?

There is also a parameter called startLine and endLine, with specify them, you could fetch a part of entire build log. But this is not useful in your scenario.

I'm afraid you have to either download full logs or get the task log of a release.