[英]aws codepipeline / cancel currently running pipeline on new commits
new to codepipeline;新的代码管道;
user A pushes, pipeline `run A` is starting.
1 min. later, user B pushes, `run A` in progress, \
new pipeline `run B` is stacked pending, until `run A` is done.
Is it possible to configure things, so that, a running pipeline is automatically cancelled when a new run (commit) is stacked?是否可以进行配置,以便在堆叠新的运行(提交)时自动取消正在运行的管道?
'Translating' the example above: : “翻译”上面的例子:
user A pushes, pipeline `run A` is starting.
1 min. later, user B pushes, `run A` is cancelled,
`run B` starts right away
TL;DR CodePipeline does not have out-of-the-box execution interruption, but you could implement it yourself. TL;DR CodePipeline 没有开箱即用的执行中断,但您可以自己实现它。
Pipeline executions work by applying three rules: 管道执行通过应用三个规则来工作:
Executions patiently wait their turn.处决者耐心地等待轮到他们。 The CLI and SDK have APIs to stop an execution and get info about executions . CLI 和 SDK 具有 API 来停止执行并获取有关执行的信息。 You could implement execution interruptions yourself by running some business logic using these APIs at the start of each new execution.您可以通过在每次新执行开始时使用这些 API 运行一些业务逻辑来自己实现执行中断。
Could, but should?可以,但应该? A 1:1 correspondence between commit and successful pipeline execution ensures you have a clean, tested rollback state at all times.提交和成功的管道执行之间的 1:1 对应关系可确保您始终拥有干净、经过测试的回滚 state。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.