| title | (Classic) Deployment Group Jobs in Release Pipelines |
|---|---|
| description | Understand deployment group jobs in Azure Pipelines. |
| ms.assetid | 05956924-242A-43D6-AA29-C93149C0265B |
| ms.topic | concept-article |
| ms.date | 01/26/2023 |
| monikerRange | <= azure-devops |
[!INCLUDE version-lt-eq-azure-devops]
You can use deployment groups in classic pipelines to define groups of target servers for deployment. Tasks that you define in a deployment group job run on some or all of the target servers. The number of target servers depends on the arguments that you specify for the tasks and the job itself.
You can select specific sets of servers from a deployment group to receive the deployment by specifying the machine tags that you defined for each server in the deployment group. You can also specify the proportion of the target servers that the pipeline should deploy to at the same time. This action ensures that the app running on these servers can handle requests during the deployment.
If you're using a YAML pipeline, you should use environments with virtual machines instead.
Use the information on one of the following tabs, depending on which pipeline you use.
::: moniker range="<=azure-devops"
Note
Deployment group jobs are not supported in YAML. You can use virtual machine resources in environments to do a rolling deployment to virtual machines in YAML pipelines.
You can configure rolling deployments by specifying the keyword rolling: under the strategy: node of a deployment job.
strategy:
rolling:
maxParallel: [ number or percentage as x% ]
preDeploy:
steps:
- script: [ script | bash | pwsh | powershell | checkout | task | templateReference ]
deploy:
steps:
...
routeTraffic:
steps:
...
postRouteTraffic:
steps:
...
on:
failure:
steps:
...
success:
steps:
...::: moniker-end
::: moniker range="< azure-devops" YAML builds aren't available. ::: moniker-end
To add a deployment group job in the editor, go to the Tasks tab of a release pipeline. On the Process channel, select the ellipsis (...). The properties for the deployment group job appear when you select the job in the editor.
Note
You can use deployment group jobs only in release pipelines. You can't use them in build pipelines.
Use the job timeout to specify the timeout, in minutes, for your jobs. A zero value for this option means that the timeout is effectively infinite. By default, jobs run until they finish or fail.
You can also set the timeout for each task individually. For more information, see Task options. Jobs that target Microsoft-hosted agents have additional restrictions on how long they can run.