When building on a remote build systems, a lot of bandwidth/time might be used to git clone/fetch for each job in the pipeline, especially on docker builds that are clean slates when started.
With gitcache, we can reduce that network usage.
To enable define a variable in the
- pull: pull only
- push-pull: pull and push when finished
- pull-clean: pull and clean cache when done
- push: only push
- clean: remove the cache
When a cache for a branche/tag is not availleble, the master is pulled, if push was defined, push to the branch!
# define the global cache settings=> all pull
- cd /
This will refresh the cache in stage cache and for the builds, the cache image will be merged with the requested image, so when pod starts, cache is present.