Trigger TeamCity构建在特定的BitBucket repo分支

时间:2017-03-28 16:18:19

标签: teamcity-9.0 teamcity-rest-api

我正在尝试使用存储库中特定分支上的REST API触发TeamCity构建。但是,始终从主分支(这是默认分支)中获取代码。不确定我做错了什么。我还需要在TeamCity上设置什么才能打开此功能吗?

我的卷毛是:

curl -v -u uname:pwd http://remoteserver.com:8111/httpAuth/app/rest/buildQueue --request POST --header "Content-Type:application/xml" --data-binary @build.xml

我的build.xml是:

<build branchName="testBranch">
<buildType id="TestTc_TestTc"/>
</build>

我正在使用TeamCity 9.任何人都可以帮助我做错了吗?

1 个答案:

答案 0 :(得分:0)

我添加了&#34; +:refs / heads /(*)&#34;在VCS Root设置中的分支规范下,它工作正常。

相关问题