Sometimes in builds there is a message about the wrong branch, but the branch matches the branches specification.
Hello.
Sometimes in builds there is a message saying the branch is wrong, but the branch matches the branch specification.
Message text:
The build was triggered in the branch hotfix/cft2main_11.25 which does not correspond to any branch monitored by the build VCS roots (the branch is either closed or excluded / not matched by any branch specification). Because of that default branch revisions were set to this build.
After displaying this message, the builds do not fall and continue to work as usual.
All builds are run manually without the use of triggers or the REST API.
3 vcs root (git) are configured for the build to work, and 1 vcs root is used to version the settings.
When starting the build, the user specifies a branch, for example, hotfix/cft2main_11.25 (variable %env.branchTarget%).
Among other things, %env.branchTarget% is used to override %teamcity.build.branch%. The %teamcity.build.branch% remapping is used only for convenient display of branches in the TeamCity interface.
It appears that TeamCity decides that the branch is invalid before checking that the user-specified branch name matches the branch specification of all vcs root.
Upload id: 2022_02_01_BPfTMyMawXm2nvqU (files: HF_HF_release_make_559_cut.log and 6 more)
I will add that it is difficult to reproduce the problem, because the message about invalid branches may not appear even if you specify a branch that is not in the specification or if you explicitly specify any invalid value for teamcity.build.branch. And this is also a problem, in fact.
We use TeamCity Enterprise 2021.2.2 (build 99660)
Please sign in to leave a comment.