Add caching for node_modules
Some checks reported errors
continuous-integration/drone/push Build encountered an error

This commit is contained in:
Peter Stuifzand 2021-02-02 22:38:59 +01:00
parent b83b633dd6
commit 0211164c92

View File

@ -16,16 +16,19 @@ steps:
- go build ./...
- go test ./...
# - name: restore-cache
# image: drillster/drone-volume-cache
# volumes:
# - name: cache
# path: /cache
# settings:
# restore: true
# file: node-cache.tar
# mount:
# - ./editor/node_modules
- name: restore-cache-with-filesystem
image: meltwater/drone-cache:dev
pull: true
settings:
backend: "filesystem"
restore: true
cache_key: "volume"
archive_format: "gzip"
mount:
- './editor/node_modules'
volumes:
- name: cache
path: /tmp/cache
- name: build-node
image: node
@ -37,16 +40,21 @@ steps:
- npm install
- npm run docker
# - name: rebuild-cache
# image: drillster/drone-volume-cache
# volumes:
# - name: cache
# path: /cache
# settings:
# rebuild: true
# file: node-cache.tar
# mount:
# - ./editor/node_modules
- name: rebuild-cache-with-filesystem
image: meltwater/drone-cache:dev
pull: true
settings:
backend: "filesystem"
rebuild: true
cache_key: "volume"
archive_format: "gzip"
# filesystem_cache_root: "/tmp/cache"
mount:
- './editor/node_modules'
volumes:
- name: cache
path: /tmp/cache
- name: publish
image: plugins/docker
@ -81,4 +89,4 @@ steps:
volumes:
- name: cache
host:
path: /tmp
path: /var/lib/cache