0

I'm using Azure DevOps pipeline to trigger automated release to group of servers. For this using Deployment group job.

My situation is i'm a fleet of EC2 instances grouped and managed by AWS AutoScaling group. New instance is launch with custom AMI pre-installed with required software packages and Azure build agent is installed at boot time. Now, I wan't this new instance to be installed with latest release of my application.

I have read Azure support post deployment trigger which can this job, I have verified new target become available when ASG create EC2 instance but no deployment is trigger on it.

My Release pipeline

Deployment group

Basit
  • 862
  • 1
  • 12
  • 30
  • https://learn.microsoft.com/en-us/azure/devops/pipelines/release/deployment-groups/?view=azure-devops Here very less documentation – Basit Sep 21 '22 at 14:44

1 Answers1

0

Based on the doc: https://learn.microsoft.com/en-us/azure/devops/release-notes/2018/jul-10-vsts#automatically-deploy-to-new-targets-in-a-deployment-group, you can now configure the environment to automatically deploy the last successful release to the new targets.

It means that it will create a new Release and redeploy in new target agents with required tag if you add some new agents into Development groups and the target agents have the required tags, as followed.

I was installing Azure Agent without tag so new target is ignored for post deploy triggers. When I install Azure Agent with tag specifying my trigger executed successfully.

For Adding Tag follow this link https://learn.microsoft.com/en-us/azure/devops/pipelines/agents/v2-linux?view=azure-devops#deployment-group-only

Basit
  • 862
  • 1
  • 12
  • 30
  • which tag did you use? deploymentgrouptag or virtualmachineresourcetags? The deploymentgrouptags works for a single project but needs a projectname argument which won't work in our case as the agent is for multiple projects. I didn't have any luck with the virtualmachineresourcetags – kuradac Feb 25 '23 at 15:21
  • I add this in installation script "addDeploymentGroupTags --deploymentGroupTags " – Basit Feb 27 '23 at 13:14
  • You can use different TAGs for different instances, and use release pipeline to run release on instance having required tag – Basit Feb 27 '23 at 13:15