Define custom clone path
What does this MR do?
As described at #197876 (closed), we should configure our Pipeline to be cloned to a customly defined directory to reduce the amount of space used on our Shared Runners.
After updating the GIT_CLONE_PATH
to /builds/gitlab-org-forks/${CI_PROJECT_NAME}
, an example jobs look as follows:
-
in
gitlab-org/gitlab
- https://gitlab.com/gitlab-org/gitlab/-/jobs/676503572#L29 - job uses the/builds/gitlab-org/gitlab
working directory (which is forced by the variable defined in project settings):Reinitialized existing Git repository in /builds/gitlab-org/gitlab/.git/
-
in
tmaczukin-test-projects/gitlab
- https://gitlab.com/tmaczukin-test-projects/gitlab/-/jobs/676498030#L22 - job uses the/builds/gitlab-org-forks/gitlab
directory (which is the default value from.gitlab-ci.yml
's variable):Initialized empty Git repository in /builds/gitlab-org-forks/gitlab/.git/
TODO checklist
-
[INFRASTRUCTURE PREPARATION] Update Runner's configuration to create a persistent, shared place for storing jobs (will be named /builds/gitlab-org-forks
)➡ https://ops.gitlab.net/gitlab-cookbooks/chef-repo/-/merge_requests/3977 -
[REQUIRED BEFORE MERGE!] define project variables to overwrite the shared setting from .gitlab-ci.yml
(for security reasons):-
prepare GIT_CLONE_PATH = /builds/gitlab-org/gitlab
variable in https://gitlab.com/gitlab-org/gitlab project -
prepare GIT_CLONE_PATH = /builds/gitlab-org/gitlab-foss
variable in https://gitlab.com/gitlab-org/gitlab-foss project -
prepare GIT_CLONE_PATH = /builds/gitlab-org/security/gitlab
variable in https://gitlab.com/gitlab-org/security/gitlab project -
prepare GIT_CLONE_PATH = /builds/gitlab-org/security/gitlab-foss
variable in https://gitlab.com/gitlab-org/security/gitlab-foss project -
prepare GIT_CLONE_PATH = /builds/gitlab/gitlabhq
variable in https://dev.gitlab.org/gitlab/gitlabhq project -
prepare GIT_CLONE_PATH = /builds/gitlab/gitlab-ee
variable in https://dev.gitlab.org/gitlab/gitlab-ee project
-
-
[THIS MR] define variable in .gitlab-ci.yml
:-
prepare GIT_CLONE_PATH: "/builds/gitlab-org-forks/${CI_PROJECT_NAME}"
at.gitlab-ci.yml
(will handle distinction between the normal version and the FOSS one)
-
-
[FINALIZATION] Transfer ownership of https://gitlab.com/gitlab-org-forks to GitLab
Marked as WIP, because before merging we need to define custom paths for our official forks (security reasons)! I'll un-wip it when required variables will be set in all the projects.
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team
Related to #197876 (closed)