Given I have Teamcity job with Git VCS root with default branch which can be changed with branch-name
parameter:
When I e.g. set branch-name<
the Teamcity has an opportunity for monitoring the branches and runs built to custom branch.
Firstly, edit your VCS Root and add follows:
Default branch: refs/heads/master
Branch specification:+:refs/heads/*
now the TC will check changes by some interval.
We are sets the master as default branch. and when we run the build with default parameters, the build will start to master
branch
If you are want to start build with custom branch then press Run...
-> Changes -> select your custom branch from Build Branch
parameter.
If you want to run build from API, or want to reverse the build branch parameter, just set Configuration parameters
with key teamcity.build.branch
and value what you want