Skip to content

Draft: WIP POC auto cancel redundant pipelines with workflow

Furkan Ayhan requested to merge 412473-spike into master

What does this MR do and why?

Warning: This is just a POC MR. Code quality and tests are broken.

I created this POC spike MR to show how the "Auto-cancel redundant pipelines" would work with the new workflow:auto_cancel keyword.

Related to #412473 (closed)

Example config;

workflow:
  auto_cancel:
    on_new_commit: interruptible # options: "interruptible", "conservative", "none"

build1:
  stage: build
  script: sleep 30

build2:
  stage: build
  script: sleep 30
  interruptible: false

test1:
  stage: test
  script: sleep 30

test2:
  stage: test
  script: sleep 30
  interruptible: false

deploy1:
  stage: deploy
  script: sleep 30

deploy:
  stage: deploy
  script: sleep 30
  interruptible: false

While this pipeline is running;

Screenshot_2023-10-04_at_14.00.56

If you send another commit to the same branch, the interruptible jobs will be canceled

Screenshot_2023-10-04_at_14.01.28

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Allison Browne

Merge request reports

Loading