Skip to content
Latchkey

How to Gate with Manual Approval in Azure Pipelines

An approval check on an environment pauses any deployment job that targets it until an approver signs off.

Approvals are configured on the environment, not in YAML. A deployment job that targets that environment automatically waits for the configured approvers.

Deployment job that hits the gate

Because the production environment has an approval check, this job pauses until approved.

azure-pipelines.yml
jobs:
  - deployment: Release
    environment: production
    strategy:
      runOnce:
        deploy:
          steps:
            - script: ./release.sh

Notes

  • Add the approval under Pipelines > Environments > production > Approvals and checks.
  • You can require multiple approvers and set a timeout that fails the run if no one acts.
  • Other checks like business hours or a REST gate can stack with manual approval.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →