Build chains with multiple repositories
I'm trying to setup a build chain with the following conditions:
Build1: uses repository Repo1
Build2: uses repository Repo2
Build2 has snapshot and artifact dependency on Build1.
Repo1 and Repo2 both have branches named Branch1 and Branch2.
When I trigger a build of Build2 Branch1, I want it to use Build1 Branch1. When I trigger a build of Build2 Branch2, I want it to use the build of Build1 Branch2. This does not seem to happen. Is this not possible, or do I have something I didn't do properly in the build configurations?
In this article from 2016:
https://blog.jetbrains.com/teamcity/2016/03/teamcity-take-on-build-pipelines/
it seem to imply that this is possible, saying the following (emphasize mine):
"You can spend time and achieve this consistency somehow via build scripts, but since many developers face the same problem, obviously this is the area where CI tools should help. TeamCity provides source code consistency for all builds in the chain automatically. It does it even if the build chain uses different repositories and even if the builds use repositories of different types – Git, HG, SVN, Perforce, TFS."
Thanks for any help.
Please sign in to leave a comment.
Hi,
Yes, that is possible. Add both Bran1 and Branch2 to the branch specification of both VCS Roots, Repo1 and Repo2 and TeamCity will automatically select the branch with the same logical name when building a dependency.
-Anatoly