Provision deployment groups

Azure DevOps Services | Azure DevOps Server 2022 - Azure DevOps Server 2019

A deployment group is a logical set of deployment target machines that have agents installed on each one. Deployment groups represent the physical environments; for example, "Dev", "Test", or "Production" environment. In effect, a deployment group is just another grouping of agents, much like an agent pool.

Deployment groups are only available with Classic release pipelines and are different from deployment jobs. A deployment job is a collection of deployment-related steps defined in a YAML file to accomplish a specific task.

With deployment groups you can:

  • Specify the security context and runtime targets for the agents. As you create a deployment group, you add users and give them appropriate permissions to administer, manage, view, and use the group.

  • Let you view live logs for each server as a deployment takes place, and download logs for all servers to track your deployments down to individual machines.

  • Enable you to use machine tags to limit deployment to specific sets of target servers.

Create a deployment group

A deployment group is a set of virtual machines with deployment agents. Every VM of the deployment group interacts with Azure Pipelines to coordinate the deployment tasks.

  1. From within your project, select Pipelines > Deployment groups.

    Access deployment groups

  2. Select Add a deployment group.

    Add new deployment groups

  3. Enter a Deployment group name and then select Create. A registration script will be generated. Select the Type of target to register and then select Use a personal access token in the script for authentication. Finally, select Copy script to the clipboard.

    Create a deployment group - generated script

  4. Log onto each of your target machines and run the script from an elevated PowerShell command prompt to register it as a target server. When prompted to enter tags for your agent, press Y and enter the tag(s) you will use to filter subsets of the servers.

    Register deployment groups servers

After setting up your target servers, the script should return the following message: Service vstsagent.{organization-name}.{computer-name} started successfully.

The tags you assign to your target servers allow you to limit deployment to specific servers in a Deployment group job. A tag is limited to 256 characters, but there is no limit to the number of tags you can use.


A deployment pool is a set of target servers available to the organization (org-scoped). When you create a new deployment pool for projects in your organization, a corresponding deployment group is automatically provisioned for each project. The deployment groups will have the same target servers as the deployment pool. You can manually trigger an agent version upgrade for your target servers by hovering over the ellipsis (...) in Deployment Pools and selecting Update targets. See Agent versions and upgrades for more details.

A screenshot showing how to update targets in deployment pools.

Set up agents on deployment groups

Every target server in the deployment group requires a deployment agent. You can install an agent on your target servers in three different ways:

You can force the agents on the target servers to be upgraded to the latest version without needing to redeploy them by selecting Update targets from your deployment groups page.

A screenshot showing how to update targets in deployment groups.

Monitor release status for deployment groups

When a release pipeline is executing, you can view the live logs for each target server in your deployment group. When the deployment is completed, you can download the log files for every server to examine the deployments and debug any issues.

Deployment groups release logs

Share a deployment group with other projects

Deployment groups can be shared with other projects in the same organization. Follow the steps below to provision your deployment group for other projects:

  1. From within your project, select Pipelines > Deployment groups.

  2. Select your deployment group and then select Manage.

    Manage deployment groups

  3. Select a project from the list and then select Save.

    Share a deployment group with a project

  4. You will now notice that there is a new Deployment Group in the project you just included.

    Shared new deployment group

Automatically deploy to new target servers

When new target servers get added to a deployment group, you can configure the environment to automatically deploy the last successful release to the new targets.

From your release pipeline definition, select the post deployment icon, and then enable the Auto redeploy trigger. Select the events and action as shown below.

Automatically deploy to new target servers