Wrong branch was deployed to production (Auto DevOps)
The following discussion from !53280 (merged) should be addressed:
Hi guys. First of all thanks for contributing @MitchellCash but the changes broke my pipelines.
Because I used
lib/gitlab/ci/templates/Jobs/Deploy.gitlab-ci.ymltemplate and my default branch was
developit deployed develop branch to production and master one to staging which is opposite to my regular pipeline (develop -> staging, master -> production). That's not good.
I think it could break pipelines for many people in the same way (!master as default branch).
Potential proposal 1
- This change deployed a wrong branch to production. This is bad
- On the other hand, having pipelines that rely on hard-coded
masterto avoid deploying default branch to production is relying on a bug
- Perhaps the middle ground is failing the
lib/gitlab/ci/templates/Jobs/Deploy.gitlab-ci.ymlif the default branch is not
- We leave
lib/gitlab/ci/templates/Jobs/Deploy.latest.gitlab-ci.ymlalone as that will become the default in %14.0
Potential proposal 2
Close as wontfix