Trigger TeamCity to build and test your project on commits to multiple branches

A while ago I learnt a great trick to get TeamCity to perform the same action for commits to multiple branches, rather than just a specific branch. To do this, simply enter +:* into the Branch specification setting, as follows:

TeamCity Multiple Branches

This option can be found in the Edit VCS Root screen.

Once this is set, you’ll see the branch name next to each build run in the results screen:

TeamCity Multiple Branches Results


Installing two build agents on TeamCity

Other than jogging my memory in the future when I need to do the same thing again, this post adds no value other than to direct people to Marcos Placona’s great blog post on how to run two build agents on the same TeamCity instance. Unfortunately this doesn’t work out of the box so there is some tweaking involved, as you’ll see.

So, without further ado, over to you Marcos…