Replace "master" with $CI_DEFAULT_BRANCH in Auto DevOps Jobs
Summary
Auto DevOps Jobs, specifically deploy jobs) hard-code the branch name rules to "master" which changes the workflow in projects where the default branch has been named something else.
Steps to reproduce
- Create a new project with only a branch called
main
and set it as the default branch - Run Auto DevOps
- The flow will look like it is being run from a feature branch
Example Project
https://gitlab.com/kohls1/gym/paul-gaffney/hello_app
What is the current bug behavior?
Auto DevOps flow for the default branch looks like a flow for the default branch if the default branch is not explicitly named "master"
What is the expected correct behavior?
The default branch should have the same flow regardless of name.
Relevant logs and/or screenshots
Output of checks
This bug happens on GitLab.com
Possible fixes
Utilize the $CI_DEFAULT_BRANCH variable in all Auto DevOps Jobs