3
votes

We are trying to set up an Azure DevOps Pipeline (fka VSTS Release Definition) to accomplish the following flow:

  • The Production stage (environment) will be triggered if the artifact's build includes a special tag named "Production". This is easily done by adding a artifact filter like so: enter image description here
  • The Dev/Test stages (environments) will be triggered if the artifact's build does NOT include the "Production" tag. We are unable to accomplish this since the Exclude filter doesn't allow excluding tags.

The reason we want to skip Dev/Test stages when it's time for us to deploy to Production is because there might be a long time gap between when a build has been validated in Dev/Test and when it's actually Production deployment time. We tag our good build with the "Production" tag and we allow our development to keep going in the master branch. Therefore, when it's time for Production deployment, we don't necessarily want to re-deploy that build to Dev/Test again since Dev/Test might be already several versions ahead.

We know we could also create a Release branch from master to accomplish this goal. However, we'd rather not create Release branches if we could skip Dev/Test deployments using build tags instead.

Please advise. Thanks!

1

1 Answers

0
votes

You may be able to achieve the outcome you are looking for but in a different way. When you create a new release for your pipeline you can change automated triggers to manual triggers.

If you want to skip non production environments so an old version isn't deployed to them, change the automated trigger to manual for those environments.

enter image description here