Add auto_cancel:on_new_commit to canceling redundant pipelines
What does this MR do and why?
This is the fourth step of #412473 (closed).
- Add auto_cancel_on_new_commit to ci_pipeline_me... (!137520 - merged)
- Add new syntax of workflow:auto_cancel:on_new_c... (!137892 - merged)
- Add `interruptible` to trigger jobs (!138508 - merged)
- <--HERE-->
- workflow:rules:auto_cancel (#436467 - closed)
In this change, we are using auto_cancel_on_new_commit
in
CancelRedundantPipelinesService
and adding safe_cancellation
to
CancelPipelineService
.
These changes are behind the FF ci_workflow_auto_cancel_on_new_commit
(#434676 (closed)).
Screenshots or screen recordings
Enable the FF:
Feature.enable(:ci_workflow_auto_cancel_on_new_commit)
Example config;
workflow:
auto_cancel:
on_new_commit: interruptible
test1:
script: sleep 1
test2:
script: sleep 60
interruptible: false
test3:
script: sleep 60
interruptible: true
Create a pipeline;
Send another commit and see the previous pipeline;
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Furkan Ayhan