Prevent execution of outdated manual deployment jobs
requested to merge 363328-skip-outdated-deployment-jobs-should-evaluate-the-job-execution-when-deployment-starts-2 into master
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
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"
- Enable
prevent_outdated_deployment_jobs
feature flag - Create a project with a long running deployment (i.e.
sleep 3600
) - Run a deployment pipeline
- Run a second deployment pipeline with an older commit than the previous pipeline
- 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.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #363328 (closed)
Edited by Allen Cook