`on_stop` jobs being created when they are not needed
Summary
I use environment.on_stop to setup stop_review jobs and found out GitLab CI created a lot of unnecessary jobs. There are two types:
-
A new job is created for each new commit to the branch. Upon branch removal, only the last stop_review job is trigger.
-
A job is created for branches specified in
except(e.g. themasterbranch). The dynamic environment show up in the list with the note "No deployments yet".
Steps to reproduce
Use this yml https://gitlab.com/daohoangson/ci-on-stop/blob/develop/.gitlab-ci.yml
Example Project
https://gitlab.com/daohoangson/ci-on-stop/
What is the current bug behavior?
-
stop_review jobs are created for each commit of the branch
-
stop_review job is created for the
masterbranch
What is the expected correct behavior?
-
Only one stop_review job should be created for each branch
-
No stop_review job should be created for the
masterbranch
Relevant logs and/or screenshots
Output of checks
This bug happens on GitLab.com
