Selective chained deploy

We have build/deploy configurations for different components of our product. Each of the build configurations builds just a specific part of the repository (although a project overlap is possible) in one step and then there's a deploy build step which has a condition to run only of a machine name has been provided when starting the build. The build always produces artifacts. So you either run it to patch a component on some machine, or to get a release package to give to a customer, or both.

We also have a separate build that builds the whole product in one go, all the components at the same time. That's typically a very long-running build with system tests, etc.

Sometimes we want to patch multiple components at the same time since they have the same underlying issue. We currently don't have any logic in place that would allow starting multiple deployment simultaneously and have all the installers install one by one on the same machine. That's why I would like to make a deploy chain - a build configuration, where people can input a machine name and check different components they want to patch. This would trigger the build configurations described above one by one, ideally in a set order (like servers->clients->tooling).

So far I figured out I need a trigger build that sets the parameters (let's call it Custom Deploy). It has parameters deploy.machine which is a dropdown and then for all the components (like Server, Client, Tool A, etc.). Until now al the component builds had their own parameter deploy.machine so that they can be run independently. I also added a trigger that starts any of these components build when Custom Deploy finishes. There's a snapshot dependency between the component build and Custom Deploy build so that they can read the parameters and use them to execute deploy and build steps. It kind of works, but the whole experience is not pleasant at all.

The problems I'm having:

  • If I trigger a component build independently it still triggers Custom Build because of the snapshot dependency. I could live with this but I don't like it.
  • Even if I don't select a component to be built in Custom Deploy the build is run because of the trigger. It just skips all the build steps. The unpleasant result is that there a successfully finished build with the build artifacts missing (some component build have an artifact dependency) but other in place which is confusing because it looks like a proper release package.
  • Not quite sure how to achieve running the component builds started by the trigger one by one and not all at once. Ideally any agent should be able to run this build chain.

Why does TC make it so damn complicated to create build chains? From the programmers point of view doing a sequential processing is the default thinking. Isn't TC a tool for developers?

CustomDeploy(machine, useA, useB)

if (useA) deployA(machine)

if (useB) deployB(machine)

Please sign in to leave a comment.