【问题标题】:TeamCity Nant REST AuthenticationTeamCity Nant REST 身份验证
【发布时间】:2011-01-10 14:30:44
【问题描述】:

在 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.

代理任务是否配置错误?

【问题讨论】:

    标签: rest nant teamcity restful-authentication teamcity-5.0


    【解决方案1】:

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

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

    更多信息和选项here

    【讨论】:

    • 这很有帮助,红方!谢谢!我尝试使用带有 Nant 的 REST API 来提取这些数据。我目前遇到身份验证错误。我将使用该信息编辑我的原始帖子。
    • @brandogs = 您需要在 url 中包含用户名和密码
    猜你喜欢
    • 1970-01-01
    • 2011-07-15
    • 2015-04-14
    • 2011-11-01
    • 2015-04-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-12-15
    相关资源
    最近更新 更多