2

在 TeamCity 中,有没有办法从构建配置中提取所有固定的工件,而不仅仅是最后固定的构建?

编辑:感谢 redsquares 的建议,我正在尝试使用带有 Nant 的 REST API 来解决这个问题。

我已经从获取固定构建更改为具有特定标签的构建,因为这允许我在需要时配置多个列表。

我想我可以按如下方式在 Nant 中使用 get 任务,然后使用 xmlpeek 任务从 xml 文件中收集信息:

<get dest="tagged.xml" src="http://<teamcity_server>:1000/httpAuth/app/rest/buildTypes/id:bt103/builds?tag=release">
    <proxy host="<teamcity_server>" port="1000">
        <credentials username="uid" password="pwd"/>
    </proxy>
</get>

我很肯定 uid 和 pwd 是正确的。尽管如此,我仍然收到以下错误:

Unable to download 'http://<teamcity_server>:1000/httpAuth/app/rest
/buildTypes/id:bt101/builds?tag=release' to 'H:\<path>\tagged.xml'.
    The remote server returned an error: (401) Unauthorized.

代理任务是否配置错误?

4

1 回答 1

19

在 teamcity 6 中,您可以使用其余 API 来获取项目的工件。

您可以编写一个 powershell 脚本来连接到其余 api 并获取所有固定的构建,然后下载这些构建的工件。

更多信息和选项在这里

于 2011-01-10T15:31:18.847 回答