Use deployment groups in a release pipeline - Azure Pipelines (2024)

  • Article

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.

    Use deployment groups in a release pipeline - Azure Pipelines (1)

  2. Select Add a deployment group.

    Use deployment groups in a release pipeline - Azure Pipelines (2)

  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.

    Use deployment groups in a release pipeline - Azure Pipelines (3)

  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.

    Use deployment groups in a release pipeline - Azure Pipelines (4)

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.

Note

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.

Use deployment groups in a release pipeline - Azure Pipelines (5)

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:

  • By running the generated script from the Deployment Groups tab.

  • If the target servers are Azure VMs, you can easily set up your servers by installing the Azure Pipelines Agent extension on each of the VMs.

  • By using the ARM template deployment task in your release pipeline to create a deployment group dynamically.

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.

Use deployment groups in a release pipeline - Azure Pipelines (6)

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.

Use deployment groups in a release pipeline - Azure Pipelines (7)

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.

    Use deployment groups in a release pipeline - Azure Pipelines (8)

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

    Use deployment groups in a release pipeline - Azure Pipelines (9)

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

    Use deployment groups in a release pipeline - Azure Pipelines (10)

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.

Use deployment groups in a release pipeline - Azure Pipelines (11)

Related articles

  • Deployment group jobs
  • Deploy to Azure VMs using deployment groups
  • Provision agents for deployment groups
  • Self-hosted Windows agents
  • Self-hosted macOS agents
  • Self-hosted Linux agents
Use deployment groups in a release pipeline - Azure Pipelines (2024)

FAQs

How to use deployment group in release pipeline? ›

You add a deployment group job in the editor by selecting '...' on Process channel in the Tasks tab of a release pipeline. The properties for the deployment group job are displayed when you select the job in the editor. Deployment group jobs can only be used in release pipelines. They cannot be used in build pipelines.

How do you use a variable group in a release pipeline? ›

To use a variable from a variable group, add a reference to the group name in your YAML pipeline file. You can then use variables from the variable group in your file. You can reference multiple variable groups in the same pipeline.

Where can a deployment group be used? ›

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.

What is the difference between deployment group and deployment pool? ›

Deployment group tags are labels that you assign to deployment targets based on their characteristics, such as environment, location, role, or configuration. Agent pools are collections of deployment agents that run on deployment targets or on separate machines.

How do I use Azure release pipeline? ›

Set up an Azure Pipelines release. In Azure DevOps, open the project that's configured with your data factory. On the left side of the page, select Pipelines, and then select Releases. Select New pipeline, or, if you have existing pipelines, select New and then New release pipeline.

What is the difference between release and deployment pipeline? ›

In Agile and DevOps methodologies, deployment and release work together to enable rapid, iterative delivery of software. The deployment phase focuses on the continuous integration and delivery (CI/CD) of code, while the release phase manages the controlled and coordinated delivery of new features to end-users.

How do you pass variables in Azure release pipeline? ›

3 Answers
  1. If you want to pass variables from one stage to another stage in yml pipelines for release, you are supposed to use echo "##vso[task....." follow the doc.
  2. You are supposed to get the value set from stage 'BuildStage'.
  3. You could refer the blog for more details. ...
  4. results in the second stage:
Jan 29, 2023

Do pipeline variables override variable groups? ›

Given a pipeline variable mapped to a variable group is using the Release scope one can then overwrite a stage by adding a staged scoped variable and value. Doing this makes it obvious we are overriding and makes it easy to remove and go back to the variable groups value.

How do I add a task group to a release pipeline? ›

Create a task group

Select a sequence of pipeline tasks that you want to turn into a task group, right-click to open the context menu, and then choose Create task group. Specify a name and description for the new task group, and the category in the Add tasks pane you want to add it to. Select Create.

Which two types of deployments are supported by CodeDeploy? ›

CodeDeploy provides two deployment type options, in-place deployments and blue/green deployments.

How can you provision the agents for deployment groups in each of your VMS? ›

Install the Azure Pipelines Agent Azure VM extension

Enter a name for the group, and optionally a description, then choose Create. In the Azure portal, for each VM that will be included in the deployment group open the Extension blade, choose + Add to open the New resource list, and select Azure Pipelines Agent.

What is the difference between deployment group and environment in Azure pipeline? ›

In effect, a deployment group is just another grouping of agents, much like an agent pool. Environments: Environment represents a collection of resources such as namespaces within Kubernetes clusters, Azure Web Apps, virtual machines, databases, which can be targeted by deployments from a pipeline.

What is the difference between deploy and release? ›

So, let's make deploy vs release talk a lot less confusing. The main difference between software deployment and release is that deployment is moving software from development to production, whereas release is referred to as making the software available for end users.

How to add deployment group in YAML file? ›

You have to also specify the resourceType for the Environment as well as the name. YAML does not support deployment groups. If you want to use deployment groups, you can't use YAML. Releases outside of deployment groups run an agent from an agent pool.

What is deployment in release management? ›

Deployment. The roll-out of new features, upgrades, or changes from one deployment environment to another. For example, you can deploy from a development environment to a staging environment. Or from a staging environment to a production environment. Release.

What is the difference between agent job and deployment group job? ›

Agent pool jobs run on an agent in an agent pool. Server jobs run on the Azure DevOps Server. Deployment group jobs run on machines in a deployment group. These jobs are only available in a release pipeline.

How do I create a deployment group in code deploy? ›

  1. Prerequisites.
  2. Step 1: Set up a GitHub account.
  3. Step 2: Create a GitHub repository.
  4. Step 3: Upload a sample application to your GitHub repository.
  5. Step 4: Provision an instance.
  6. Step 5: Create an application and deployment group.
  7. Step 6: Deploy the application to the instance.
  8. Step 7: Monitor and verify the deployment.

Top Articles
Latest Posts
Article information

Author: Msgr. Benton Quitzon

Last Updated:

Views: 6078

Rating: 4.2 / 5 (43 voted)

Reviews: 82% of readers found this page helpful

Author information

Name: Msgr. Benton Quitzon

Birthday: 2001-08-13

Address: 96487 Kris Cliff, Teresiafurt, WI 95201

Phone: +9418513585781

Job: Senior Designer

Hobby: Calligraphy, Rowing, Vacation, Geocaching, Web surfing, Electronics, Electronics

Introduction: My name is Msgr. Benton Quitzon, I am a comfortable, charming, thankful, happy, adventurous, handsome, precious person who loves writing and wants to share my knowledge and understanding with you.