I am trying to trigger TeamCity build from command line. Firstly, I tried:
curl http://<user name>:<user password>@<server address>/httpAuth/action.html?add2Queue=<build configuration Id>
But in latest versions of TeamCity this approach is removed and response is following:
405 Only POST method is allowed for this request.
So, based on information from https://www.jetbrains.com/help/teamcity/rest-api.html#RESTAPI-BuildRequests it should work via REST API in this way:
url -v -u user:password http://teamcity.server.url:8111/app/rest/buildQueue --request POST --header "Content-Type:application/xml" --data-binary @build.xml
build.xml example:
build.xml
<build>
<buildType id="buildConfID"/>
</build>
For me is not clear where should I place my configured build.xml?