Skip to content

Add auto cancel pipeline on job failure syntax support

What does this MR do and why?

This is the first step of #23605 (closed).

  1. <-- HERE -->
  2. Cancel a pipeline when configured to auto cance... (!141812 - merged)
  3. Added documentation for workflow:auto_cancel:on... (!145709 - merged)

This MR introduces the database models and .gitlab-ci.yml syntax for supporting the newly introduced workflow:auto_cancel:on_job_failure feature 🙂

I am also introducing a new feature flag, :auto_cancel_pipeline_on_job_failure, that can be used to enable or disable this new feature 🙂

Screenshots or screen recordings

N.A.

How to set up and validate locally

  1. Make sure that pipelines with the following workflow syntax do not show any "syntax error"
    workflow:
      auto_cancel:
        on_job_failure: all|none

N.B.: this (the syntax support) is not behind a feature flag, only the memorization inside the database is.

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 Marco Zille

Merge request reports