gpt4 book ai didi

azure-pipelines - 如何在 Azure DevOps 管道中使用手动验证任务?

转载 作者:行者123 更新时间:2023-12-05 01:56:48 25 4
gpt4 key购买 nike

我已经阅读了 official document for the Manual Validation task .

这是我的 YAML 管道中的一个阶段:

  - stage: Prod
dependsOn: QA
condition: and(succeeded('QA'), eq(variables['Build.SourceBranch'], 'refs/heads/release'))
jobs:
- job: WaitForValidation
pool: server
displayName: Wait for approval
timeoutInMinutes: 4320
steps:
- task: ManualValidation@0
timeoutInMinutes: 1440 # task times out in 1 day
inputs:
notifyUsers: |
one@email.com
other@email.com
instructions: 'Approve the deployment to Prod'
- template: build-and-deploy-stage.yml
parameters:
targetEnv: 'Prod'
dataset: 'prod'
token: $(deploymentTokenProd)

这是build-and-deploy-stage.yml:

parameters:
- name: targetEnv
type: string
- name: dataset
type: string
- name: token
type: string

jobs:
- job: Deploy
displayName: Build and deploy to ${{ parameters.targetEnv }}
steps:
- task: NodeTool@0
displayName: 'Install Node LTS'
inputs:
versionSpec: '14.18.x'
# … not relevant but using parameters.dataset and parameters.token

不幸的是,即使没有人手动批准/恢复管道,Deploy 作业仍在运行。

只能在一个阶段结束时使用才能进入下一阶段吗?

最佳答案

我最终在工作中使用了 dependsOn

关于azure-pipelines - 如何在 Azure DevOps 管道中使用手动验证任务?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69703810/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com