We are using the Gitlab Kubernets runner in combination with Kubernetes Autoscaling.
Therefore, a job usually has to clone the whole repository from scratch.
As we are switching to a monorepo and are storing our dependencies inside the repository, the repository may grow fast and cloning can take a considerable amount of time.
Therefore, we’d like to know whether it is possibly to cache the git repository in-cluster so cloning inside the runner can be done in a fraction of the time.
The S3 cache only seems to be used for artifact caching. Also, while setting up a docker proxy for caching is mentioned in the docs, there is no mention of caching git (or git lfs) repositories.
Alternatively, if this is not possible for a whole repository, is it possible to cache the LFS objects in the cluster, e.g. in the S3 runner cache?