用命令行运行Teamcity构建

6

我想通过命令行运行在Teamcity中创建的构建任务。是否可以通过命令行运行Teamcity构建?如果可以,那么该命令是什么?

2个回答

10

如果您有使用 curl 的选项,您可以尝试这个http请求:

curl http://<user name>:<user password>@<server address>/httpAuth/action.html?add2Queue=<build configuration Id>

点击此处获取更多信息。


4

通过命令行触发构建的推荐方式是使用REST API。

curl -u user:password --request POST  http://teamcity:8111/app/rest/buildQueue --header "Content-Type:application/xml" --data-binary @build.xml

build.xml示例:

<build>
  <buildType id="HelloWorld_A"/>
    <lastChanges>
      <change id="760"/>
    </lastChanges>
</build>

如需更多详细信息,请参阅文档中相关的部分


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接