Build tagging progamatically by http

The build tagging feature (http://www.jetbrains.com/teamcity/features/build_management.html#Build_Tags_Pins_and_Comments) is great.

However I want my deployments to automatically tag the fact that a build has been deployed to a particular environment.  The deployment script knows the build number and can talk http to the TeamCity server.

Is there a URL like those described at http://www.jetbrains.net/confluence/display/TCD4/Accessing+Server+by+HTTP which I can hit to cause a tag to be associated with a particular build?

3 comments
Comment actions Permalink

This feature is not documented but you can try the following HTTP request:
/httpAuth/ajax.html?setLabelForBuild=<build id>&labelName=<tag name>&labelingRootsManual[<vcs root id>]=true&labelingRootsManual[<vcs root id>]=true

This will tag build with specified id (<build id>) using the tag <tag name>. Tag will be set for VCS roots with specified ids (see <vcs root id>).

0
Comment actions Permalink

Thanks Pavel.

However, I don't want to tag the VCS roots - I just want to apply a TeamCity tag, which shows up on the build history page.

In the GUI I'd set this by finding the build on the list, hovering over the down arrow next to "None" on the Tags column, clicking [Edit] then typing / picking the tags from the javascript box that appears, and clicking save.

Is there an action.html request to do this?

0
Comment actions Permalink

Ok, then another undocumented HTTP request

/httpAuth/ajax.html?editTagsForBuild=<build id>&buildTagsInfo=<comma separated tags>

0

Please sign in to leave a comment.