Sunday, January 6, 2013

Queue build from another build: template

Recently I needed to run one main build and then trigger several "child" builds if the main one succeeded. The most obvious was to make a PS script which is scheduled, but then I was curious to make it also from standard TFS build. So I did.

So, build definition takes the following parameters:



 As you can see - it doesn't ask for solution to build, agent and etc etc. That was the most tricky part. To achieve that you need to clean up and change some in template arguments like this:

The rest is more or less obvious - queue main build, wait for it to complete, check status, and queue child builds. From standard build definition only those activities in the beginning should be present:

No stuff like run on agent etc, since build is not doing any heavy work, I decided this is not needed.
Ping me back if you need some more help.

1 comment: