Skip to content

Add auto-cancel for pending pipelines on branch, if they are not HEAD

What does this MR do?

Decrease entropy in Gitlab universe 😸

First iteration for #8998 (closed)

  • Adds option "Auto-cancel pending pipelines" in "CI/CD Pipelines" project settings tab: when checkbox checked, all pending non-HEAD pipelines will be canceled by system, automatizing scenario:

    1. "User creates pipeline for branch" / "User pushes commit to gitlab"
    2. User goes to pipelines index page and cancel unnecessary (only pending) pipelines.
  • Adds target: '_blank' to doc links in "CI/CD Pipelines" project settings tab

  • Refactor spec/services/ci/create_pipeline_service_spec.rb, extracting execute_service method

UI:

  • Pipeline list:
    • Tooltip on canceled status badge
  • MR widget/commit widget:
    • Pipeline #12345678 was auto-canceled.. etc
    • Hovering over the words auto-canceled will bring the same tooltips
  • Pipeline page:
    • Tooltip on canceled status badge
  • Pipeline graph job node:
    • has improved tooltip with auto-canceled (not anything else)
  • Mini pipeline graph stage and job status icons
    • has improved tooltip with auto-canceled (not anything else)
  • Job list
    • Tooltip on canceled status badge
  • Job list in pipeline view
    • Tooltip on canceled status badge
  • Job view
    • Tooltip on canceled status badge

Are there points in the code the reviewer needs to double check?

Why was this MR needed?

Many reasons are discussed here #8998 (closed)

Screenshots (if relevant)

Option in CI/CD Pipelines Project settings tab:

Screen_Shot_2017-03-12_at_22.31.06

Pipeline list:

Screen_Shot_2017-04-04_at_22.26.12

Pipeline page:

Screen_Shot_2017-04-04_at_22.27.48

Job list:

Screen_Shot_2017-04-04_at_22.28.36

Job view:

Screen_Shot_2017-04-04_at_22.29.17

Job list in pipeline view:

Screen_Shot_2017-04-04_at_22.31.33

Setting:

Screen_Shot_2017-04-06_at_01.44.43

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

#8998 (closed)

Merge request reports

Loading