简体   繁体   中英

Trigger Snapshot Dependency to Build Specific Branch in TeamCity

Let's say I have a project Foo configured with Git VCS root having default branch feature/foo . I'd like to have a snapshot dependency on a project Bar that is unit testing every feature branch on the same repo as Foo (ie, the VCS root for Bar has no default branch and is instead watching feature/* ).

What I see happening is that Foo can only trigger builds on Bar's <default> branch. Can I change it so that Bar gets triggered for the right branch?

It is impossible to configure VCS root without default branch in TeamCity (see related issue http://youtrack.jetbrains.com/issue/TW-23395 ). So if you do not define default branch for Bar build configuration it will be set to master by default. And if you trigger a build with default branch, all dependencies will be triggered with default branch as well.

The solutions is to configure the same branch specification for Foo configuration as for Bar (feature/*). If you run Foo build manually you need to select needed branch using Run Custom Dialog (Changes tab), if you run build using VCS trigger you need to configure Branch filter.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM