added caching to pipeline
This commit is contained in:
+27
-1
@@ -2,6 +2,17 @@ kind: pipeline
|
||||
name: default
|
||||
|
||||
steps:
|
||||
|
||||
- name: restore cache
|
||||
image: drillster/drone-volume-cache
|
||||
settings:
|
||||
restore: true
|
||||
mount:
|
||||
- ./node_modules
|
||||
volumes:
|
||||
- name: cache
|
||||
path: /cache
|
||||
|
||||
- name: npm install
|
||||
image: node:12
|
||||
commands:
|
||||
@@ -12,6 +23,16 @@ steps:
|
||||
commands:
|
||||
- npm run build
|
||||
|
||||
- name: rebuild cache
|
||||
image: drillster/drone-volume-cache
|
||||
settings:
|
||||
rebuild: true
|
||||
mount:
|
||||
- ./node_modules
|
||||
volumes:
|
||||
- name: cache
|
||||
path: /cache
|
||||
|
||||
- name: deliver container
|
||||
image: plugins/docker
|
||||
settings:
|
||||
@@ -60,4 +81,9 @@ steps:
|
||||
from_secret: docker_password
|
||||
when:
|
||||
event:
|
||||
- tag
|
||||
- tag
|
||||
|
||||
volumes:
|
||||
- name: cache
|
||||
host:
|
||||
path: /tmp
|
||||
Reference in New Issue
Block a user