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.
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