Can you queue Build-Deploy-Test workflows in TFS 2010?

123 views Asked by At

I have been using the Build-Deploy-Test build workflow for TFS 2010 (see here http://msdn.microsoft.com/en-us/vstudio/gg131922.aspx) and would just like to know if there is a way you can queue one or more of these to run on the same lab environment?

I have come up with a brittle but (mostly) working solution to this by modifying the Build Template. I set the 'environment in use' flag whenever the workflow starts, and any subsequent workflows loop and wait for the flag to be cleared.

My solution works most of the time, but occasionally I experience race conditions and both workflows try to start at the same time, one 'winning' and reverting the environment to a test-ready snapshot first.

As you can tell, this is a poor solution but a quick one! Is there a proper way to queue Build-Deploy-Test workflows on an environment?

1

There are 1 answers

0
andrew_scfc On BEST ANSWER

There is no way to do this out-of-the-box with TFS 2010; this confirmed by allen from Microsoft (see comments).

I solved this issue more satisfactorily by implementing a custom build activity that maintains an in-memory register of all builds using a particular lab environment. I interact with this activity using a modified version of the DefaultLabTemplate, waiting to start the build until the configured lab environment becomes available.

The solution is by no-means perfect, as it does not scale beyond a single build controller but works sufficiently for the needs of my organisation!