add cache

This commit is contained in:
zhiqiang feng
2022-09-26 15:08:42 +08:00
parent 1e9339398c
commit be205df62e
+28 -5
View File
@@ -7,6 +7,28 @@ platform:
os: linux
arch: amd64
- name: restore-cache
image: drillster/drone-volume-cache
volumes:
- name: cache
path: /cache
settings:
restore: true
mount:
- ./node_modules
- name: rebuild-cache
image: drillster/drone-volume-cache
volumes:
- name: cache
path: /cache
settings:
rebuild: true
mount:
- ./node_modules
clone:
image: reg.int.it2000.com.cn/devops/git
tags: true
@@ -15,21 +37,22 @@ clone:
steps:
- name: build
image: reg.int.it2000.com.cn/library/node:14.20-bullseye
#volumes:
# - name: app
# path: /drone/src
commands:
- node -v
- npm -v
- yarn --version
- yarn install
volumes:
- name: app
- name: cache
host:
path: /opt/node/app
path: /opt/node/cache
- name: certs
host:
path: /etc/ssl/certs
- name: docker
host:
path: /var/run/docker.sock
volumes: