This is a pure Bash Woodpecker CI plugin to cache files and/or folders to a locally mounted volume based on Drillster/drone-volume-cache.
For more information on how to use the plugin, please take a look at the docs.
Build and push a new version of the docker image by running:
docker build --rm=true -t gowerstreet/drone-volume-cache:latest .
docker push gowerstreet/drone-volume-cache:latest
Execute from the working directory:
docker run --rm \
-e PLUGIN_REBUILD=true \
-e PLUGIN_MOUNT="./node_modules" \
-e CI_REPO_OWNER="foo" \
-e CI_REPO_NAME="bar" \
-e CI_PIPELINE_NUMBER=0 \
-v $(pwd):$(pwd) \
-v /tmp/cache:/cache \
-w $(pwd) \
gowerstreet/drone-volume-cache
Or add in your docker compose file:
restore-cache:
image: gowerstreet/drone-volume-cache
volumes:
- "/tmp/cache:/cache"
settings:
mount:
- local-m2
restore: true