0
votes

Release Pipeline

I have the above Release pipeline in Azure Devops

I want the release to cover CD for both the Develop (TST), Release (UAT) and Master (PROD) environments.

Ultimately I want to trigger a deployment to Production (based on a Tag) from the Master Branch, trigger a release to UAT from any Release/* Branch and trigger a release to a Test environment from the Develop branch.

Is this possible with a single Release Pipeline or would I need 3 separate pipelines?

Problem with this existing pipeline a deployment to Test is happening when I make a change to the Release branch - which is not really what I want.

2

2 Answers

3
votes

Figured it out - soultion was one Build Pipeline with 3 branch filters.

In the release pipeline set an Artifact filter for each environment (TST, UAT, PROD) now the release is only triggered for the correct branch!

0
votes

You can add condition each one environment, for example if you want to deploy to TEST environment, you should add condition to TEST environment such as;

and(succeeded(), eq(variables['Release.Artifacts._TaskRetail-Develop.SOURCEBRANCHNAME'], 'BRANCH_NAME'))