Nerf
Nerf

Reputation: 938

build git branch with snapshot dependency in TeamCity

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?

Upvotes: 2

Views: 1572

Answers (1)

Senior Pomidor
Senior Pomidor

Reputation: 1915

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.

Upvotes: 2

Related Questions