1

I have multiple VCS roots set up (Core, AuthN, Other). Due to out of control cross-cutting code, when we build Other, we need to download Core and AuthN in order to build a testing database for integration tests. Where I'm having issues is that we'll have up to 3 different branches of each active at any time: Current, Patch, Hotfix. When Other builds, the correct branch of the other 2 needs to come down as well, (e.g. if Other's Hotfix branch builds, it needs to pull Core and AuthN's Hotfix branch). Since these specific build numbers change on a regular basis, I'm uncertain how to get Other to identify which branch it needs.

I have Other set up with 3 VCS roots (one for Other, Core and AuthN), each with their own branchName parameter as the default branch. I also have a series of parameters created that identify what the current patch and hotfix version is for the next releases. I then created a PS script, that uses these values, plus the current branch name (Other's version), to set Core and AuthN branch names, but that build step doesn't run until after VCS downloads have completed. How can I get the correct version of Core and AuthN for a given version of Other

Wes P
  • 9,622
  • 14
  • 41
  • 48

1 Answers1

1

If the branches in the different repositories are with the same name, you can probably use TeamCity feature branches and snapshot dependencies between the different build configurations.

So if the build chain triggers on a change in a particular branch in one repository then TeamCity will do its best to trigger the builds for the corresponding branches in the rest of the chain.

See the screenshot: Example

If there's a change in 'hotfix' branch of Step1 build configuration (#8), then the corresponding branch is built in Step2. However, if there was a change in the 'alternative' branch that only exists in Step2, then Step1 will be built from default branch which is 'master' in this example (#10).

Anton Arhipov
  • 6,479
  • 1
  • 35
  • 43
  • hm... I'll consider this. Might be a bit more convenient doing this and tagging versions, rather than creating branches each time we need to release something. Thank you :) – Wes P May 01 '18 at 12:50
  • @WesP in VCS root settings, right after branches spec, enable "Use tags as branches" checkbox. You will then be able use tags for the releases -- the build chain will behave the same way. – Anton Arhipov May 01 '18 at 18:07