2
votes

Build which depends on snapshot dependency uses wrong branch.

Main VCS(for nugets, builds, code analysis): default branch: develop, +:refs/heads/*

Environment 1 VCS: default branch: master And here I have snapshot dependency to build from Main VCS. And when "Environment 1 VCS" build it uses default branch from "Main VCS".

How to fix it?

1

1 Answers

2
votes

build configuration has teamcity.build.branch parameter, which responsible for which branch will be used.

So, Environment 1 VCS create Configuration Parameter which will change your parent dependency configuration branch.

name = reverse.dep.*.build.branch
value = %teamcity.build.branch%

So, when you run your child configuration and select any brunch, then teamcity.build.branch=your branch

enter image description here

reverse.dep means Overriding Dependencies Properties for your parent configuration. It means you parent configuration will run on some branch.