Skip to content

Prevent execution of outdated manual deployment jobs

What does this MR do and why?

When a manual deployment job would result in an older build being deployed, and "Skip outdated deployment jobs" is enabled on the project, the user no longer is given the option to run the outdated manual deployment job.

Screenshots or screen recordings

image

How to set up and validate locally

.gitlab-ci.yml

image: alpine

build:
  stage: build
  script: 
    - echo "building..."

production:
  stage: deploy
  script: sleep 3600 && echo "deploying app..."
  environment:
    name: "production"
  1. Enable prevent_outdated_deployment_jobs feature flag
  2. Create a project with a long running deployment (i.e. sleep 3600)
  3. Run a deployment pipeline
  4. Run a second deployment pipeline with an older commit than the previous pipeline
  5. Note that the manual deployment job (i.e. production) can no longer be ran from the 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.

Related to #363328 (closed)

Edited by Allen Cook

Merge request reports