How to make build dependencies execute on right branch in a merge request ?
With teamCity v2020.2.1 and gitlab.com.
I try without success to make the following work :
- Merge request on Gitlab, from branch "feature/awesome-stuff" into "develop", which creates a branch "merge-request/1",
- In TeamCity, trigger a "A" build on "merge-request/1" with pull-request & commit status publisher features,
- "A" build has snapshot dependencies on "B" and "C" builds, which I want to be reusable (e.g "B" is "npm install, npm lint" etc. on an Angular frontend, I want it to be reusable to be a dependency of deploy builds etc.).
That works
The pull-request/commit status publishing parts are ok : "A" build does trigger, and Gitlab do receive the update status. The "A" build does execute on the right branch ("merge-requests/1").
My problem
"B" and "C" builds are running against their default branch ("develop"). I want them to execute on "merge-requests/1" branch.
What I did actually in TeamCity
"A" "B" and "C" share the same VCS root, attached as image
Build "A", "B", "C" VCS configuration (the same for all builds) attached as image
"B" and "C" have a checkout-rule on "angular" folder, because I want them tu run only if there have been changes in this specific folder.
Pull-request plugin configuration attached as image.
Upload id: 2020_12_23_7hdWnBWsTsLaaoWL (files: 2.png and 2 more)
I really checked similar threads, a bunch of articles, tutorials, documentation... I did not managed it to work.
Any clue on what am I missing ?
Please sign in to leave a comment.