Reputation: 8967
I have a pipeline TeamCity 7.1 project with multiple configs.
Config "MyBuild" builds a project for a VCS Root pointed at a GitHub repo with multiple branches and has Branch Specification = +:refs/heads/*
Config "MyDeploy" deploys the package created by "MyBuild" and has a snapshot dependency on "MyBuild".
I am finding that "MyDeploy" will always trigger "MyBuild" for the master branch -- even if there exists a more recent build for some other branch.
Is it possible to configure "MyDeploy" to either (1) deploy the latest successful build for a specific branch, or (2) deploy the latest successful build for any branch ?
Upvotes: 4
Views: 1764
Reputation: 4993
I have just faced the same problem. There are two workarounds that I have found:
Upvotes: 0
Reputation: 2469
Seems like you can't do it, yet.
From the Team City Docs:
If build configuration with branches has snapshot dependencies on other build configurations, when a build in a branch is triggered, all builds from the chain will be marked with this branch too.
It is currently not possible to configure artifact dependencies to retrieve artifacts from a build from a specific branch, artifact dependencies always use builds from default branch. The same applies to finish build trigger. It will only watch for finished builds from default branch.
Upvotes: 2