“在先前的执行成功之后进行构建"在Azure Devops中 [英] "Build after the previous execution has succeeded" in Azure Devops
问题描述
我有一个Azure管道A,如果发生PR合并,该管道将执行对我的Salesforce组织的部署.
I have a an Azure Pipeline A, that executes a deployment to my Salesforce org in the event of a PR merge.
我的问题陈述是,
我无法限制该管道的执行,以使其仅在先前完成同一管道的执行之后才执行.
I am not able to restrict the execution of this pipeline such that it executes only after the previous execution of the same pipeline has completed.
换句话说,如果该管道是由多个PR触发的,那么我只希望管道的一个实例运行.下一个应该等待,直到上一次运行完成.
In other words, if this pipeline is triggered by multiple PR's, then I would want only once instance of the pipeline to run. The next one should wait until the previous run has been completed.
有没有办法做到这一点?
Is there a way to achieve this?
推荐答案
您可以启用在构建过程中批量更改"选项,以一次执行一个管道. 如果您的问题与发布管道有关,则可以通过在特定阶段的预部署"条件下的部署队列设置"中指定执行次数来实现.
You can enable "Batch changes while a build is in progress" option to execute one pipeline at a time. If your question was on Release Pipeline, you can achieve this through specifying number of executions in the "Deployment queue settings" under Pre-Deployment conditions for the particular stage.
这篇关于“在先前的执行成功之后进行构建"在Azure Devops中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!