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