Caches build artifacts to Google Cloud Storage
390
Caches build artifacts to Google Cloud Storage
pipeline:
restore-cache:
image: takemikami/drone-gs-cache
restore: true
keyfiles: package.json
bucket: bucket-xxx
*** integration & deployment ****
save-cache:
image: takemikami/drone-gs-cache
save: true
keyfiles: package.json
paths:
- node_modules
bucket: bucket-xxx
save-cache:
image: takemikami/drone-gs-cache
clean: true
keep_cache_age: 5
bucket: bucket-xxx
Build the Docker image with the following commands:
docker build --rm -t plugins/gs-cache .
Execute from the working directory:
docker run --rm \
-e PLUGIN_RESTORE=true \
-e PLUGIN_KEYFILES="package.json" \
-e PLUGIN_BUCKET="bucket-xxx" \
-v $(pwd):$(pwd) \
-w $(pwd) \
plugins/gs-cache
docker run --rm \
-e PLUGIN_SAVE=true \
-e PLUGIN_KEYFILES="package.json" \
-e PLUGIN_PATHS="node_modules" \
-e PLUGIN_BUCKET="bucket-xxx" \
-v $(pwd):$(pwd) \
-w $(pwd) \
plugins/gs-cache
docker run --rm \
-e PLUGIN_CLEAN=true \
-e PLUGIN_KEEP_CACHE_AGE=14 \
-v $(pwd):$(pwd) \
-w $(pwd) \
plugins/gs-cache
Content type
Image
Digest
Size
43 MB
Last updated
about 8 years ago
docker pull takemikami/drone-gs-cache