Retrigger build chain and pick up changed source

Completed

I have three build configurations inside a build. Let's say A, B and C. C depends on B and B depends on A.

Suppose I trigger a build manually on C. Now, A, B, C steps will get queued for build.

Step A might cause a source update and commit to source control. When this happens, I want to stop the entire build chain first. Then I want to Retrigger (automatically) C with the same parameters as when it was run manually in the first place - but using the new source.

Is there any way to get this done?

0
1 comment
Avatar
Fedor Rumyantsev

Hello!

You could cancel out A build whenever you commit to the source control (for example, with service messages if custom script is used during the build - https://www.jetbrains.com/help/teamcity/build-script-interaction-with-teamcity.html), and configure snapshot dependencies in a way that cancelled dependency causes build cancel (so that cancelled A yields cancelled B yields cancelled C). 
Automatically triggering a new chain with a newer revision could be trickier, though. Could you please elaborate what exactly happens during step A (and what is the workflow in general), so that I would have a better idea of what to suggest? 

0

Please sign in to leave a comment.