TeamCity Snapshot Dependency GitHub分支

我有一个带有多个配置的管道TeamCity 7.1项目.

配置“MyBuild”为VCS Root构建一个项目,该项目指向具有多个分支的GitHub存储库,并具有Branch Specification =:refs / heads / *

配置“MyDeploy”部署由“MyBuild”创建的包,并且对“MyBuild”具有快照依赖性.

我发现“MyDeploy”将始终为主分支触发“MyBuild” – 即使某个其他分支存在更新的构建.

是否可以将“MyDeploy”配置为(1)为特定分支部署最新的成功构建,或者(2)为任何分支部署最新的成功构建?

最佳答案 似乎你不能这样做.

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.

点赞