Use pre_clone_script to have a hot local clone of Git Repository for CI build
Some time ago we introduced pre_clone_script
: https://docs.gitlab.com/runner/configuration/advanced-configuration.html.
This is administratively configured (by Administrator of runner) script that is executed before the git clone
happens.
We can use that to do git clone
from some other location (local to runner) before doing then a git fetch
from GitLab.
The other location can:
- just have a simple
git daemon
which periodically updates repositories, - just expose a
git bundle
over http that we could download and unpack that is periodically updated, - it can be our cache server with simple docker container running one of the above,
It would basically allow us to reduce the egress traffic of CI for gitlab-ce probably by something like 90-95% without the hurdle of implementing full-fledged git proxy cache server.
@bkc @stanhu @pcarranza What do you think?