Fan out - fan in, or how to wait for all builds to finish

HI,

I have a main core project that many dependent projects depends on. On a change on the main Core project i trigger all my dependent projects to rebuild. Now i want after all my projects have rebuilt to trigger deployment of all those projects to a test environment. I don't want to trigger deployment before all builds have finished as after the deployment is triggered i want to run tests and create artifacts (which takes a long time and will be a waste).

What would be a good way to implement this on Teamcity? I was thinking if i could potentially check if any builds are in process atm... Not sure how to do this, the only thing comes to my mind is to use a system variable to store last build time...

0
2 comments
Avatar
Permanently deleted user

Ok, i've just used rest api to check if any of the builds are building...

0

Hi Fedor,

It seems it might be easier than that. Calling C your core, and A and B two of the dependencies, I don't really understand whether C runs first and then A and B run second, or whether when C is triggered, an instance of A and B are added to the queue as snapshot dependencies.

In any of the two situations, you can simply put at the end of the line a build D that depends on C (if A and B run first) or A and B (if C runs first). That way, D will wait until all previous builds are finished and it can perform whatever deployment or task you want it to perform.

If I'm missing something please feel free to expand.

0

Please sign in to leave a comment.