Sequential Tasks With Parallel Groups
This topic explores how to configure sequential tasks with parallel groups in Release, allowing you to organize tasks that run sequentially within parallel execution groups.
With the parallel group task type you can execute tasks in parallel, instead of in sequence. By using dependencies among tasks, it is possible to "chain" some or all of the tasks in a parallel group in a sequence.
The sequential group task type can be use to group tasks that should be executed in order.
Execute tasks using multiple parallel groups
This example shows how Release can execute deployments to multiple servers in parallel, with the tasks on each server executing sequentially.
In the "Deploy" phase below, there is an outer parallel group called "Concurrent Server Deployments", which groups the tasks for the server. There are two sequential tasks per server: "Deploy code" and "Check results".
In this setup, the default behavior of the "Server 1" and "Server 2" parallel groups is to run the "Deploy code" and "Check results" tasks in parallel. To change this so that the tasks execute sequentially, switch to the planner view.
You can link the tasks to ensure they execute sequentially.
Both server deployment blocks execute in parallel, but the tasks within each deployment are sequential:
Execute tasks using a single parallel group
The intermediate parallel groups "Server 1" and "Server 2" are not required as shown above. The same result can be achieved with a single parallel group. In the release flow:
In the planner:
This approach saves one level of nesting of parallel groups. It loses some visibility into the logical grouping of tasks for "Server 1" and "Server 2". Example: You can no longer collapse only the tasks for "Server 1". The approach with multiple parallel groups is recommended.