2
votes

I'd like to set up a pre-deployment gate with the following logic

  • If the branch (embedded in the artifact names, i.e. 1.2.4-myBranch) matches the currently deployed branch (to the stage in question) allow the release to deploy automatically
  • If it doesn't match, require a manual override before the release is deployed

The reason for this is we have multiple test environments where generally we only want to allow a release from the same branch to overwrite the deployment but obviously once we're done with a particular phase of testing we'd want to change the deployed branch.

I can't see any obvious way to do this, is it possible?

1

1 Answers

0
votes

As a workaround:

We could create two Stages A and B

Select the stage A and configure the pre-deployment as below:

enter image description here

And configure stage B trigger mode to Manual only

enter image description here

Result:

If the branch match master, it will allow the release stage A to deploy automatically.

If not, we need to manually deploy stage B

enter image description here

enter image description here

You could also add your request for this feature on our UserVoice site, which is our main forum for product suggestions. Thank you for helping us build a better Azure DevOps.