我看到有一个REST端点可以通过其ID ( https://docs.microsoft.com/en-us/rest/api/azure/devops/build/builds/get%20build%20log?view=azure-devops-rest-5.1 )获取日志
从我看到的情况来看,每个步骤都有一个日志,然后最后一个日志包含所有步骤。回应总是这样吗?这是否记录在最后一个日志始终是完整日志的某个地方?
有没有办法知道为构建失败的阶段获取哪个日志?因为我只需要导致构建失败的那一个,而不是所有的。
发布于 2019-10-25 07:20:29
不,目前在Azure DevOps服务中还没有这样的方法来实现你所需要的东西。
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?
还有一个名为startLine和endLine的参数,通过指定它们,您可以获取整个构建日志的一部分。但这在您的场景中没有用处。
恐怕您必须下载完整的日志或get the task log of a release。
https://stackoverflow.com/questions/58549338
复制