Azure DevOps - 预批准部署阶段

Azure DevOps - Pre-approve deployment stages

我在 Azure DevOps 中有一个 yaml 部署管道。阶段顺序如下所示:

构建后,开发会自动部署,但 QA 有一个批准集。问题是,我必须等待构建和开发完成才能批准 QA。有没有办法在开始构建时或构建期间提前批准阶段?

Is there a way to approve a stage in advance when starting the build or during it?

Azure devops目前不支持在开始构建时提前批准阶段的功能。

根据文档Define approvals and checks

A pipeline is made up of stages. A pipeline author can control whether a stage should run by defining conditions on the stage. Another way to control if and when a stage should run is through approvals and checks.

A stage can consist of many jobs, and each job can consume several resources. Before the execution of a stage can begin, all checks on all the resources used in that stage must be satisfied. Azure Pipelines pauses the execution of a pipeline prior to each stage, and waits for all pending checks to be completed. If any of the checks fails (for example, if you reject an approval on one of the resources), then that stage is not executed.

我们可以知道批准和检查是针对阶段而不是管道设置的。当我们的阶段还没有启动时,它不会检测我们设置的批准和检查。

但个人认为你的要求是合理的,我们需要在一定程度上剥离审批和检查,以便在管道启动时检测到。您可以在我们的 UserVoice 网站 (https://developercommunity.visualstudio.com/content/idea/post.html?space=21 ) 上添加对此功能的请求,该网站是我们提供产品建议的主要论坛。感谢您帮助我们构建更好的 Azure DevOps。

希望这对您有所帮助。