Only Able to use 1 VCS Label in Build
Completed
I'm running Team City Enterprise 2019.1.5
We've been successfully using GIT VCS Labeling as a feature for months where we add a build label BL_%build.number% to GIT. In it, I have a filter to use the default branch(master) as the filter: +:<default>
Recently I was asked to label any non-master branches as HOT_%build.number%. Easy enough, I add a second VCS Label in the build feature, and set it to -:<default> . This is correct but it's not working. I even used the wizard to write it for me, and arrived at the same -:<default> setup. I've even tried doing -:refs/heads/master. No Dice. No matter what I do, Team City does not label non-master/default branches.
What's wrong with my setup?
Please sign in to leave a comment.
I meant to add it in the post, but the DSL looks like this:
Hello!
Please mind that branch filter does not implicitly include +:* rule when only negative rules are present. That means that for the second feature essentially no branches are allowed as per filter.
I would suggest to amend it like below:
+:*
-:<default>
Just had a quick test to confirm this works as intended (i.e. labeling everything but the default branch).
Please let me know in case of any further questions.
Today I learned.
Yeah, I am testing it on the server and that does it. Thank you!
We are actually going to improve our documentation on that part as the logic is non-obvious but it`s shared among several TeamCity features. Thanks for mentioning this case!
You are most welcome! Please feel free to reach out if there is anything else we could help with.