运行 Teamcity 通过命令行构建

Run Teamcity builds through command line

我想 运行 通过命令行在 Teamcity 中创建一个构建作业。是否可以通过命令行 运行 构建 teamcity?如果是,那么它的命令是什么?

如果 curl 是一个选项,您可以尝试这个 http 请求:

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

Have a look 了解更多信息。

通过命令行触发构建的推荐方法是使用 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>

有关详细信息,请参阅文档中的相关 section