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 os: linux
arch: amd64 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: clone:
image: reg.int.it2000.com.cn/devops/git image: reg.int.it2000.com.cn/devops/git
tags: true tags: true
@@ -15,21 +37,22 @@ clone:
steps: steps:
- name: build - name: build
image: reg.int.it2000.com.cn/library/node:14.20-bullseye image: reg.int.it2000.com.cn/library/node:14.20-bullseye
#volumes:
# - name: app
# path: /drone/src
commands: commands:
- node -v - node -v
- npm -v - npm -v
- yarn --version - yarn --version
- yarn install
volumes: volumes:
- name: app - name: cache
host: host:
path: /opt/node/app path: /opt/node/cache
- name: certs - name: certs
host: host:
path: /etc/ssl/certs path: /etc/ssl/certs
- name: docker - name: docker
host: host:
path: /var/run/docker.sock path: /var/run/docker.sock
volumes: