chore: 添加 node_modules 缓存
This commit is contained in:
22
.drone.yml
22
.drone.yml
@@ -3,6 +3,11 @@ type: kubernetes
|
||||
|
||||
name: build-and-deploy-dev
|
||||
|
||||
volumes:
|
||||
- name: node-cache
|
||||
claim:
|
||||
name: node-cache-pvc
|
||||
|
||||
service_account_name: drone-builder-sa
|
||||
|
||||
trigger:
|
||||
@@ -16,11 +21,17 @@ steps:
|
||||
image: ccr.ccs.tencentyun.com/violin/node:24-alpine
|
||||
commands:
|
||||
- npm install
|
||||
volumes:
|
||||
- name: node-cache
|
||||
path: /root/.npm
|
||||
|
||||
- name: dev-build
|
||||
image: ccr.ccs.tencentyun.com/violin/node:24-alpine
|
||||
commands:
|
||||
- npm run build:h5
|
||||
volumes:
|
||||
- name: node-cache
|
||||
path: /root/.npm
|
||||
|
||||
- name: dev-build-image
|
||||
image: ccr.ccs.tencentyun.com/violin/drone-kaniko:latest
|
||||
@@ -49,6 +60,11 @@ type: kubernetes
|
||||
|
||||
name: build-and-deploy-prod
|
||||
|
||||
volumes:
|
||||
- name: node-cache
|
||||
claim:
|
||||
name: node-cache-pvc
|
||||
|
||||
trigger:
|
||||
event:
|
||||
- push
|
||||
@@ -60,11 +76,17 @@ steps:
|
||||
image: ccr.ccs.tencentyun.com/violin/node:24-alpine
|
||||
commands:
|
||||
- npm install
|
||||
volumes:
|
||||
- name: node-cache
|
||||
path: /root/.npm
|
||||
|
||||
- name: prod-build
|
||||
image: ccr.ccs.tencentyun.com/violin/node:24-alpine
|
||||
commands:
|
||||
- npm run build:h5
|
||||
volumes:
|
||||
- name: node-cache
|
||||
path: /root/.npm
|
||||
|
||||
- name: prod-build-image
|
||||
image: ccr.ccs.tencentyun.com/violin/drone-kaniko:latest
|
||||
|
||||
Reference in New Issue
Block a user