Reputation: 1668
I want to run a build job created in Teamcity through command line. Is it possible to run teamcity builds through command line? If yes, then what is the command for that?
Upvotes: 6
Views: 5650
Reputation: 3370
The recommended way to trigger build via command line is using 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 example:
<build>
<buildType id="HelloWorld_A"/>
<lastChanges>
<change id="760"/>
</lastChanges>
</build>
For more details see the related section in the documentation.
Upvotes: 4
Reputation: 9969
If curl
is an option you can try this http request:
curl http://<user name>:<user password>@<server address>/httpAuth/action.html?add2Queue=<build configuration Id>
Have a look for more information.
Upvotes: 10