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