Reputation: 3991
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
to develop
in admin screen, go back to build configuration home and run custom build where I change branch-name
parameter to master
then I get:
Why is that? What should I change, so that I don't get this message and I can change branch when running custom build?
The reason for this is I want to build and deploy software artifacts from any feature branch
Upvotes: 3
Views: 4975
Reputation: 1915
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
Upvotes: 3