Artifact Dependency Branch Filter ordering/precendence?

I have what I think is a simple scenario in artifact dependency for a TC build.  What I want is for the dependency from another build to come from the same branch if it exists.  If it doesn't then just use <default>.  The reason being is that personal builds don't build the dependent artifact so we want a default for them.  Currently our "Build Branch Filter" Looks like:

+:%teamcity.build.branch%

I would hope that something like this would work:

+:%teamcity.build.branch%
+:<default>

where it would match the branch if it exists and then use default if it doesn't.  The behavior seems to be that if we add <default> then no matter what, a build will always use default and skip the branch that you would think it should match.

 

1
1 comment

So we have updated TeamCity to the latest build as of this post: TeamCity Professional 2022.04.4 (build 108763)

We continue to see this same behavior where the line for %teamcity.build.branch% while being the the same branch name gets tossed aside as soon as <default> is added as a fallback.  Ordering doesn't matter and if <default> is there it will always win. 

To get around this we have created a build pipeline where we don't include <default> and that does the one step that needs this dependency from another build configuration and if its a private branch/build it just fails since it can't find the match.  A terrible non-solution for TeamCity not appearing to follow its own documentation on branch filtering

0

Please sign in to leave a comment.