Build's Artifact Dependency cannot be based on * branch selection


when I try to create an Artifact Dependency in a build config based on Git, I need to use a Branch Filter that allow 'optional * placeholder', the same way it works for Triggers based on dependent buids.

But the Build Branch field in the Artifact Dependency dialog box doesn't seem to allow usage of an optional * placeholder.

Would it be possible to add this feature?




Currently it is not possible to configure artifact dependence using wildcards for branch. There is a related feature request in our tracker: Please vote for it.
Could you please describe your use case in more detail? Perhaps I would be able to suggest you a solution.


Thanks for your reply, I've voted for the existing issue.

My usecase is related to another issue you've already responded to: (Using a maven build maven version as a parameter in a dependent build)

I need a deploy build to be triggered based on a dependent build that picks up changes in a Git refs/heads/hotfix/*.
Right now, in my deploy build, I have to manually edit the Artifact Dependency to build branch refs/heads/hotfix/1.0.19, then 1.0.20 etc...

This deploy build should be able to pick up the right maven build version, which happen to be the same as the hotfix branch name, to be able to download the maven artifact from a central repo and deploy it.


Won't it be an option to configure artifact + snapshot dependency? In this case if a build configuration with branches has snapshot dependencies on other build configurations, when a build in a branch is triggered, the other builds in the chain also get the branch associated.


This would be an option if we deployed all branches to the same environment.
But as we commit and build on 2 major branches (development and master), we need to deploy to each of them to specific environment.



this is becoming a major issue for us, so I'm keen to find a solution.
Actually, reading again your last answer, I don't thing I fully get what you mean: I don't see how using artifact + snapshot dependency would help.

Here're our 2 use cases where I feel we would need a wildcard on build branches:

We use the Giflow branch management process, so we have two major branch, develop and master. The same build gets triggered for for each commit on whichever branch: it only builds the artifact and upload it to a Nexus repo.

when we create a hotfix branch from the master one, we want to trigger a deployment script. For this we need a build with an Artifact Dependency to monitor change on refs/heads/hotfix/* (currently we can't and have to manually modify the build for each hotfix: ex. refs/heads/hotfix/1.0.13)

2) when we create a release branch from the develop one, we want to trigger a deployment script. For this we need a build with an  Artifact Dependency to monitor change on refs/heads/releases/* (currently  we can't and have to manually modify the build for each release: ex.  refs/heads/release/1.1.0)

Thanks for help and ideas.
Could we create a feature request for this to be implemented in Teamcity?


The approached are:
1. Use snapshot dependency in addition to artifact dependency. With this, you can use "build from the same chain" artifact dependency.
2. Handle this on the organizational level: always deploy from a dedicated branch (say, "deploy"), so before deploying, set merge the changes to "deploy" branch or set the "deploy" branch to the necessary commit and run the build/test on that.

The describe feature request is addressed by the ticket: you've already voted for. Also see the suggested workaround.


Please sign in to leave a comment.