在Azure YAML管道中实现盖茨 [英] Implementing Gates in Azure YAML Pipelines

查看:11
本文介绍了在Azure YAML管道中实现盖茨的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经看到并使用了Azure发布管道。

我们希望使用基于YAML的管道,因为在Git中很容易进行版本控制。有没有办法将管道进行分段拆分,每个阶段都有审批人和后续阶段的手工触发。

yaml

在推荐答案中,它的工作方式不同。要使用审批和检查,您需要首先定义环境。一旦有了环境,您就可以定义approvals and checks

重要的是

YAML文件中未定义审批和其他检查。修改管线YAML文件的用户不能修改在阶段开始之前执行的检查。资源管理员使用Azure管道的Web界面管理检查。

然后可以在部署作业中选择环境:

jobs:
- deployment: string   # name of the deployment job, A-Z, a-z, 0-9, and underscore
  displayName: string  # friendly name to display in the UI
  pool:                # see pool schema
    name: string
    demands: string | [ string ]
  dependsOn: string 
  condition: string 
  continueOnError: boolean                # 'true' if future jobs should run even if this job fails; defaults to 'false'
  container: containerReference # container to run this job inside
  services: { string: string | container } # container resources to run as a service container
  timeoutInMinutes: nonEmptyString        # how long to run the job before automatically cancelling
  cancelTimeoutInMinutes: nonEmptyString  # how much time to give 'run always even if cancelled tasks' before killing them
  variables: { string: string } | [ variable | variableReference ]  
  environment: string  # target environment name and optionally a resource-name to record the deployment history; format: <environment-name>.<resource-name>
  strategy: [ deployment strategy ] # see deployment strategy schema

您也可以检查此topic on github

没有计划在YAML中添加审批。但是,我们确实计划支持在各种资源(例如服务连接、变量组、代理池等)上配置审批。

而且没有门(至少现在还没有)。因此,您不能通过批准来保护特定阶段,但可以保护作业中使用的某些资源(如环境)。

这篇关于在Azure YAML管道中实现盖茨的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆