Add order requirement for snapshot dependencies.

We have build configs that deploy code to our various installation units. As in:

  - Deploy A to production

  - Deploy B to production

  - Deploy C to production (And the list goes on)

These are totally independent, as we need to be able to deploy just one of them after a code change (or revert back to known good code).

But we also have a 'Deploy all' build config that have snapshot dependencies on all our deploy build configs, which we use when we want to just generally push out changes everywhere.

However, there we'd like to for instance, ensure A is deployed first, and only deploy B if we successfully managed to deploy A.. We'd like to reuse our deploy build configurations for single deploy, but we can't add snapshot dependeny from deploy B to deploy A, as then we cannot just deploy B without touching A anymore.

Is there any way for a parent build configuration to induce order? Or do we have to have separate build configurations for all our deployments to get this working?

0
1 comment

The usual recommendation in this case would be to extract templates of A and B, then generate a second build configuration for them. Keep deployments to A or B separate depending on how you want to deploy them.

 

Snapshot dependencies are, beside declaring a dependency, the tool of choice to create ordered sets of builds in TeamCity. If the order relations will have a different set of requirements (in your case, trigger one after another one has finished or independently), the approach from within TeamCity is to have a separate build for each of the requirement set. Using templates or the Kotlin DSL should make it pretty much trivial.

0

Please sign in to leave a comment.