我有一个多阶段 YAML 管道,其中包含两个阶段 1)构建和 2)部署。下面提到了部署阶段,我想在部署任务之前在该阶段添加预部署批准。如何在多阶段 YAML 管道中添加部署前和部署后批准?
stages:
- stage: 'Build'
# RESTORE
# Some task implementation
# BUILD
# Some task implementation
# PUBLISH
# Some task implementation
# DEPLOY STAGE
- stage: 'Dev'
displayName: 'Deploy to the dev environment'
dependsOn: Build
jobs:
- deployment: Deploy
pool:
vmImage: 'ubuntu-16.04'
environment: dev
variables:
- group: Release
strategy:
# HOW TO ADD PRE DEPLOYMENT AND POST DEPLOYMENT APPROVALS?
runOnce:
deploy:
steps:
- download: current
artifact: drop
- task: AzureWebApp@1
displayName: 'Azure App Service Deploy: website'
inputs:
azureSubscription: 'Resource Manager - Tailspin - Space Game'
appName: '$(WebAppNameDev)'
package: '$(Pipeline.Workspace)/drop/$(buildConfiguration)/*.zip'