Release Management TFS 2015 - No Parallel Tasks

2019-09-06 23:44发布

问题:

I'm currently in the process of migrating from full fat on site Release Management to the web based version in TFS 2015. One thing I've noticed is that in the old client you can create a deployment sequence and configure actions to run in parallel, for example I might have these two steps running at the same time:

SQLServer - DeployDatabase.ps1
AppServer - DeployWebApp.ps1

In the web based version it appears the equivalent of 'Actions' (now being referred to as 'Tasks') can only be set serially. So you can see there's potentially a significant loss of time when you expand the idea of parallel tasks to multiple server roles (all performing independent steps).

For clarity, I know you can setup a task to target a group of servers, but this will limit you to only running one type of task at a time.

So my question is: Does this functionality exist? Have I missed a trick somewhere? It seems the new web based release management focuses more on the Parallel environment deployment aspect of things, forgetting the need to deploy in as fast a way as possible through each environment.

Edit: An example of what I'm describing above.

Parallel Template

You can see that I have parallel deployments occurring on different server roles withing an environment. I understand the recommendation made in the answer by Daniel Mann is to create multiple environments and trigger accordingly, the problem with adding multiple "Envs" to cater for this is that we lose all of the good things like the ability to quickly copy and manipulate environments. IE I setup a DEV environment template and copy this one "environment" to create "QA", but if I had 10 "Environments" for one true "Environment" then I'd have to manage that overhead. It feels like a large chunk of usability may have been removed in the new offering. Or am I missing the new concept?

回答1:

The offering in TFS 2015 is a bit limited in that regard, but the offering has been improving rapidly since then. In TFS 2017 (and VS Team Services), you can set more robust environment triggers and deployment conditions for environments. This allows you to "fan out" to multiple simultaneous environments and then "fan in" to subsequent environments. With that, you can, for example, have an environment pipeline that looks like this:

         Dev
     _____|_________
     |              |
QA Database Tier QA Web Tier
     |_______________|
          |
       Staging
          |
         etc

Both the "QA" environments could be independently deploying in parallel as long as there were multiple agents available to run them.

However, also keep in mind that the licensing requirements around concurrent builds/deployments are different in TFS 2017 and VS Team Services. The Release hub in TFS 2015 was considered a "preview" and didn't have any particular licensing requirement in terms of how many concurrent build/deploy pipelines could be running.