Skip to content

Do foundational work to support to support gitlab-org/gitlab default branch

Summary

gitlab-com/gl-infra/delivery#1357 (closed) plans to rename gitlab-org/gitlab default branch from master to main, the timeline is still in the works (it might happen during the first quarter of 2021) but when it happens we should be prepared.

Let's use this issue to discuss what needs to be done (if anything) on GitLab Build Images before the switch.

Proposal

I'm not certain this project depends on a hardcoded master branch for gitlab-org/gitlab. From a quick search, seems it only references master on some comments in yml files:

./Dockerfile.gitlab-qa-alpine-ruby-2.7:2:#  - GitLab CE/EE Review: https://gitlab.com/gitlab-org/gitlab/-/blob/master/.gitlab/ci/review.gitlab-ci.yml
./Dockerfile.gitlab-qa-alpine-ruby-2.6:2:#  - GitLab CE/EE Review: https://gitlab.com/gitlab-org/gitlab/-/blob/master/.gitlab/ci/review.gitlab-ci.yml
./.gitlab-ci.yml:73:# Used by GitLab: https://gitlab.com/gitlab-org/gitlab/blob/master/.gitlab-ci.yml
./.gitlab-ci.yml:130:# Used by go projects for linting https://gitlab.com/gitlab-org/gitlab/blob/master/doc/development/go_guide/index.md#automatic-linting
./.gitlab-ci.yml:207:# Used by go projects for linting https://gitlab.com/gitlab-org/gitlab/blob/master/doc/development/go_guide/index.md#automatic-linting

Rough plan could be as follow:

  1. Identify what areas of the GitLab Build Image codebase depend on a hardcoded master branch for gitlab-org/gitlab
  2. Adjust the corresponding files (if any)