Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

It's rare that an organisation would want a Git commit to be automatically promoted all the way to Production; most organisations would want at least one part of the delivery pipeline to require a manual approval. Fortunately this can be easily configured in Azure DevOps.

Configuring a Manual Approval Check

  1. In your Azure DevOps project, go to the resource (ie. environment) that needs to be protected.

    Image RemovedImage Added

  2. Navigate to Approvals and Checks for the resource.

    Image RemovedImage Added

  3. Select [+] to create a check and select Approvals then Next.

  4. Provide the approvers and an optional message, and select Create to complete addition of the manual approval check.

...

When you run a pipeline the execution of that run pauses before entering a stage that uses the environment. Each stage’s environment requirements are specified using the environment key as a property of a deployment job. The example below is taken from the pipeline that ships with MettleCI where the environment name is parameterised:

Code Block
...
jobs:
  - deployment: Deploy_${{ parameters.EnvironmentID }}
    displayName: Deploy to ${{ parameters.EnvironmentName }}
    pool: 'My Agent Pool Name'
    environment: ${{ parameters.EnvironmentName }}
    strategy:
      runOnce:
        deploy:
          steps:
            ...

...

On this page you can click Review to display the approval dialog where you can enter a comment before clocking clicking Approve or Reject.

...

If you have configured Azure DevOps Teams Integration you will also receive a post in your Teams channel from which you can also submit your approval by clicking Approve:

...