I am testing the git partial clone feature on a large monorepo. A developer might run the following commands on his machine:
git clone --filter=blob:none --sparse THE_MONOREPO_URL.git
git sparse-checkout init --cone
git sparse-checkout set SOME FOLDERS
This seems to be working well, and I am now trying to get CI up and running in Gitlab. If I use the default settings in my .gitlab-ci.yml
file, Gitlab clones the entire monorepo, which takes forever.
Gitlab recently added experimental support for partial clones, but is there any support in Gitlab-CI? Is my only option to use GIT_STRATEGY: none
and then clone everything manually in the before_script
using the commands above?