Environments Dashboard showing link to the latest pipeline link even if deploy job hasn't run
Summary
Environments Dashboard shows link to the latest pipeline and latest pipeline's deploy job even if the deployment job hasn't been run in that pipeline yet.
Steps to reproduce
- Create a project and add
.gitlab-ci.yml
:
stages:
- ".pre"
- build
- deploy_preprod
- ".post"
build:
stage: build
script:
- echo "build job"
deploy_qa:
cache: []
dependencies: []
when: manual
script:
- echo "CI_ENVIRONMENT_NAME:$CI_ENVIRONMENT_NAME"
- echo "CI_ENVIRONMENT_TIER:$CI_ENVIRONMENT_TIER"
stage: deploy_preprod
resource_group: qa
environment:
name: QA
- Run a pipeline. Run the manual
deploy_qa
job. - Run a new pipeline. Do not run the manual
deploy_qa
job. - Go to Environments Dashboard
- Add this project to the environments dashboard
- The environment named QA will show a link to
deploy_qa
job on the top. It links to the job from the latest pipeline; but that job hasn't been run yet. - Also on the bottom of the environment, hover over the green
Passed
button. It links to the latest pipeline instead of the latest pipeline wheredeploy_qa
job has run.
Example Project
https://gitlab.com/e_munn_ultimate_group/tests/ci-tests/environments
What is the current bug behavior?
- Environments dashboard shows the link to the latest pipeline regardless of whether or not the deploy job has run; instead of pipeline that ran the deployment job.
- Environments dashboard shows the link to the deploy job in the latest pipeline even if it hasn't been run yet, instead of the last deploy job that ran.
What is the expected correct behavior?
Environments dashboard should have links to the correct job & pipeline.
Relevant logs and/or screenshots
Output of checks
This bug happens on GitLab.com