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

让人想犯罪 __ 提交于 2019-12-13 05:30:24

问题


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 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!



来源:https://stackoverflow.com/questions/20516617/can-you-queue-build-deploy-test-workflows-in-tfs-2010

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!