Skip to content

Allow rollback with Prevent Outdated Deployment Job feature

What does this MR do and why?

This MR resolves Allow Rollback in urgency with Prevent Outdated Deployment Job feature by allowing rollback via job-retry. This will effectively restore the rollback feature in Deployment Index page, which is useful in an urgent case.

The pending or manual jobs are still prevented by Prevent outdated deployment jobs feature.

Resolve #378359 (closed)

Describe in detail what your merge request does and why.

Screenshots or screen recordings

Peek_2022-10-24_18-24

How to set up and validate locally

  1. Add the following .gitlab-ci.yml:
    build:
        script: echo
        environment: prod
        when: manual
  2. Enable Prevent Outdated Deployment Job.
  3. Run a pipeline, execute the manual job and make sure it succeeds.
  4. Run two more pipelines.
  5. Execute a manual job in the latest pipeline.

Expectation:

  • You can't run a manual job in the second latest pipeline because it's outdated.
  • You can rollback to the first pipeline because it's rollback via job retry.

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 Shinya Maeda

Merge request reports