访问来自同一构建的先前 运行 的工件

Accessing artifacts from previous run of the same build

我想为易碎测试实施重新运行 解决方案。

我在将上一个 运行 构建中的工件传递到下一个构建时遇到问题。 Artifacts B -> B (Run 2) 是否有任何选项可以从同一快照中同一构建的最新 运行 中获取工件?现在我知道唯一的选择是从 Teamcity API.

获取工件

如前所述,唯一的选择是从 TC API 获取最新版本号,然后通过此版本号从 API 获取工件。没有更好的选择。

获取最新版本:

https://teamcity.com/httpAuth/app/rest/builds?locator=snapshotDependency:(from:(id:$parentBuildId),includeInitial:false),defaultFilter:false,buildType:$buildTypeId,state:finished,failedToStart:false,canceled:false,count:1

获取神器:

"https://teamcity.com/httpAuth/app/rest/builds/id:$latestBuildId/artifacts/content/$failed_tests_filename"

我正在回答,以防其他人寻求解决方案。