add cache
This commit is contained in:
+28
-5
@@ -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:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user