Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get TeamCity to build latest tag

We would like to set up TeamCity to monitor our tag directory and automatically build when a new tag is created.

This means that when we have a version ready for release all we need to do is create a tag and TeamCity can then take care of our build, deploy etc.

Currently the only solution is to have a relase branch which we then copy the tag to after we have created it. Ideally we would like to remove this extra step.

like image 888
robmcm Avatar asked Jul 26 '11 08:07

robmcm


People also ask

How do you tag a build in TeamCity?

Apart from the Actions menu, you can tag a build in the Run Custom Build dialog and in the Pin Build dialog. You can also add and modify build tags using TeamCity REST API.

How do I create a new build on TeamCity?

To add your first project, click Administration in the upper right corner of the TeamCity UI and then click Create project. There are several ways to create a project in TeamCity: automatically from a repository URL, from a connection to a specific VCS, or manually.

How do I check my TeamCity build history?

Build History in Classic UIClick All history link to open the History tab.


1 Answers

Not sure it can be done as you described as TC wouldn't know what the latest tag is; unless you have an actual Latest tag which you overwrite each time which is quite common.

Only way I can think to reduce manual work is to perhaps setup your TC Project VSC Root to point at myProj/tags/ then set the check-out rule to +:v1.2.3.4 where v1.2.3.4 is the name of your latest tag.

So when you create a new tag, just update the check-out rule to point at it then hit the build button.

like image 54
Siy Williams Avatar answered Nov 08 '22 17:11

Siy Williams