chore: 添加 node_modules 缓存

This commit is contained in:
Agent
2026-03-23 13:37:39 +00:00
parent 3dc5b2f4e7
commit efac494063

View File

@@ -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