0

Context

I have a project absed on a vcs root with the wildcard branch filter (+:*), meaning that it will trigger a build on every possible modification pushed to git.

Because we're on a migration process, our current projects have a lot of branches, and we want to start the build process on some of them.

Issue

Because the Run button of the build starts a build with default branch (AKA master), we can't run a build on a given branch, the need being to have a select box with existing branches that you can select for the build.

Already tried / Invalid solutions

A solution would be to push a dummy commit on each branch to trigger TC and make it see the branch, this way we could select the branch in the run options, but that's not a solution to us because pushing a dummy commit just for that feels wrong.

I can also use the solution provided in Select Git branch for TeamCity Build, but the issue is that we have a lot of branches with quite heavy names, and this solution allows typo, which is not what we want.

Supamiu
  • 8,501
  • 7
  • 42
  • 76

1 Answers1

0
  1. Make sure you have correctly configured branch specification in VCS Root settings. In my case:

enter image description here

  1. Go to build configuration, select branch you want to build from and press run:

enter image description here

Working with feature branches from TC docs should be helpful as well.

Hope that helps.

PS: Based on TC 2017.2.1 (build 50732)

Rob
  • 9,664
  • 3
  • 41
  • 43