Introducing TeamCity’s Dependent Builds

Posted on by lisar

With this post we open a series of publications devoted to the description of use cases and peculiarities of dependent builds in TeamCity 4.0.

So first of all, let's dig into the issue of why you may need using dependencies in your software building system. Today's IT companies tend to develop more and more complex software solutions while trying to constantly keep the quality of the product on a high level and move on faster. In a situation like this inter-project dependencies management can become an important factor for delivering successful products within a tough time frame. So, using TeamCity’s dependencies can help you:

  • run custom environment-specific builds.
  • create frequent builds to catch all possible issues earlier.
  • optimize your hardware resources spreading the work between several machines (Build agents) running in parallel or in sequence.

In general, when specifying dependencies, you just divide a single build procedure into several parts that can be run on different Build agents setting a subordination of one build configuration on a different one. So, specifying dependencies in TeamCity you simply create rules stating that, for example, builds of the A build configuration depend on the build of the B build configuration.

TeamCity let's you specify two different types of dependencies for your builds; these are snapshot and artifact dependencies.

Snapshot dependency is a dependency of a build configuration on a different one which ensures that both builds use the same sources, and these sources revisions correspond to the same moment of time. If a build is queued and there is no dependent build for the same sources snapshot, the necessary dependent build automatically gets into TeamCity's build queue.

Artifact dependencies provide you with convenient means to use the output (artifacts) of one build in a different one. When your set up the artifact dependency, the required artifacts are downloaded to the agent before a build starts. Any time later you can then take a look at what artifacts were used in a build or what build used artifacts of the current build on a Dependencies tab of the Build Results page.

To specify dependencies in your project, navigate to the Administration, then create/edit build configuration and then select Dependencies.

Technorati tags: , , , , , , , ,, , ,

Comments below can no longer be edited.

1 Response to Introducing TeamCity’s Dependent Builds

  1. Vadim says:

    January 30, 2009

    Hi!

    This is all cool. Can make one build depend on another (snapshot dependency) plus make it run on the same agent? That would be nice because the total build time is getting longer and longer and the size of artifacts makes it prohibitive to copy. This would allow to separate out groups of tests. Thanks.

Subscribe

Subscribe for updates