Cannot perform custom run on non-default branch
I've got a VCS root defined on a parent project, with a default branch of /main and branch spec of +:(/main/*). Then, a subproject's build config template has branch filter set to +:*. However, the build config made from that template cannot see any branches when I try to run a custom build… it only shows me changesets from the default branch of the VCS.
I'm running TeamCity Professional 2024.03.1 (build 156270), and using the UVCS/Plastic SCM plugin for VCS.
Please sign in to leave a comment.
Hi Nick,
Is the problem still present?
The branch filter does not extend the branch specification of the attached VCS Roots. It just filters branches from the branch specification. So, in your example, even if the branch filter is set to
+:*, the build configurations based on this template will only see the/main/*feature branches.If you want to override the VCS Root's settings, you should parametrize the ‘Default branch’ and ‘Branch specification’ fields of the VCS Root. Set the default values of the corresponding parameters to
/mainand/main/*accordingly. This way, you can override the values of the corresponding parameters in individual build configurations. You can even change them in the Run Custom Build dialogue. Is that what you were trying to achieve?So, the way I was able to get around this was by simply specifying the exact changeset that I wanted to build from. Then TC was smart enough to check that one out, and run the build config from there.
I think my main point of confusion was, I was expecting to see more of a listing of available branches when running a custom build. I'll note that, for the time being, all of our branches are children of
/main, so I think theoretically they should have been visible; or at least, not hidden or omitted.Hi Nick,
Your assumption is correct. The same branches should be displayed in the Branch Selector on the Build Configurations Overview page and the ‘Build branch’ dropdown in the Run Custom Build dialogue. However, Plastic SCM is a third-party plugin, so if it doesn't work correctly, you should report the problem to the plugin's developer.