Environments View - Shortcut button to execute the latest manual deployment job
Summary
Initially reported by Premium customer here (internal use).
When deploying to multiple environments in a pipeline, if one job & environment has a when:manual
specification, the other jobs inherit a manual deploy button tied to that environment.
Consider the .gitlab-ci.yml here. With this, we have a deployment job for three environments - dev
, stg
, and prd
. The job deploy-prd
is the only job with a a when:manual
specification.
After the pipeline runs, the dev
and stg
environments have a manual play button that is tied to the job for the prd
environment. This is not only a UI bug, as clicking the button does in-fact execute the deploy-prd
job.
Steps to reproduce
- Fork this project
- Run a pipeline.
- View the environments page and click the play button for the
dev
andstg
environments.
Example Project
https://gitlab.com/calebw/envs_test
What is the current bug behavior?
Manual deploy buttons for some environments are tied to the wrong job.
What is the expected correct behavior?
A manual deployment button for the environment is tied to the correct job responsible for the environment.
Output of checks
This bug happens on GitLab.com. This was also replicated on self-managed instances running v14.2.5 and v14.8.4.