Trigger sequentially after multiple parallel builds in TeamCity

We have more than 150 projects that I put together, reconfigured and optimized in several TeamCity configurations with several build agents in order to try to improve the performance of the build server, which is currently building very consistently.

The combination of technologies (Web, dotNet, VB6, and COM +) and system architecture means that there are various stages (configurations) that can now be performed in parallel, but which need to be combined further down the track.

This is a very simplified dependency scenario, but it presents a problem with us ....

A -> B -> Collate (-> Deploy) A -> C -> Collate (-> Deploy) 

The problem is that if change A is made, this will trigger B and C, which will cause the Collate (and Deploy) steps to be executed twice, even though they are a common trigger in A. Like me Already said, this is a simplification of the real set of almost 20 configurations, and frequent adjustments affect the improvement of speed.

Can anyone suggest any way so that I can identify the fact that both B and C will be called as a result of A and take the Collate step to wait until both B and C are complete before the Collate phase starts? Obviously, a change to B or C should be able to run Collate independently.

+6
source share
1 answer

I am new to TeamCity, but I believe that this is what you need:

  • A : no triggers or dependencies
  • B and C : no triggers, snapshot dependencies on A
  • Collate : VCS trigger, snapshot dependency on B and C

With this setup, one click of VCS will result in:

  • exactly one assembly A , B , C and Collate
  • A built before B and C
  • B and C built before Collate
  • everything is built from the same point in vcs

If you want to transfer artifacts down the chain, you will also need to determine the dependencies of the artifact.

If different assemblies use different VCS repositories, you still should not install VCS triggers on A , B and C ; instead, you set the “Trigger on changes on snapshot dependencies” option in the VCS trigger for Collate .

+13
source

Source: https://habr.com/ru/post/957480/


All Articles