Trigger TeamCity build on a specific BitBucket repo branch

I'm trying to trigger a TeamCity build using the REST API on a specific branch in a Bitbucket repository. However, it is always fetching the code from the master branch only.

My curl is:

curl -v -u uname:pwd http://remoteserver.com:8111/httpAuth/app/rest/buildQueue --request POST --header "Content-Type:application/xml" --data-binary @build.xml

 

And my build.xml is:

   <build branchName="testBranch">

   <buildType id="TestTc_TestTc"

   </build>

 

I'm using TeamCity 9. Could anyone help me on where I am going wrong?

 

0
1 comment

Is the VCS Root set up to track testBranch? If not, it will fall back to the default. Otherwise, it should trigger a build in the branch you request.

0

Please sign in to leave a comment.