【问题标题】:Trigger TeamCity build on a specific BitBucket repo branch在特定的 BitBucket 存储库分支上触发 TeamCity 构建
【发布时间】:2017-03-29 03:20:57
【问题描述】:

我正在尝试使用 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。谁能帮我解决我做错了什么?

【问题讨论】:

    标签: teamcity-9.0 teamcity-rest-api


    【解决方案1】:

    我在 VCS 根设置的分支规范下添加了“+:refs/heads/(*)”,它运行良好。

    【讨论】:

      猜你喜欢
      • 2015-02-07
      • 1970-01-01
      • 2020-06-27
      • 1970-01-01
      • 2014-11-18
      • 1970-01-01
      • 2017-04-03
      • 2023-03-04
      • 1970-01-01
      相关资源
      最近更新 更多