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.shNotes
- 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
How to Use a Deployment Job with an Environment in Azure PipelinesUse an Azure Pipelines deployment job targeting a named environment to get deployment history, approvals, and…
How to Deploy to AKS in Azure PipelinesDeploy to Azure Kubernetes Service from Azure Pipelines using the KubernetesManifest task and a Kubernetes se…