Caches


Caches

Transport temporary data between jobs using caching

Pipelines should assume that the cache must be rebuilt

The cache keyword defines when to push and pull

One job downloads or generates data and pushes to the cache

Subsequent jobs can pull from the cache to hit the ground running

Examples for many programming languages


Hands-on for runner local cache

Runner local cache requires persistent volume for Docker executor

Cross-runner caches require an object store…

… with an S3-compatible API

Self-hosted option using MinIO

XXX https://docs.gitlab.com/ee/ci/caching/#where-the-caches-are-stored

XXX https://docs.gitlab.com/runner/executors/docker.html#configure-directories-for-the-container-build-and-cache

XXX https://docs.gitlab.com/runner/configuration/advanced-configuration.html#the-runnersdocker-section