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
|
name: build-and-deploy-dev
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
- name: node-cache
|
||||||
|
claim:
|
||||||
|
name: node-cache-pvc
|
||||||
|
|
||||||
service_account_name: drone-builder-sa
|
service_account_name: drone-builder-sa
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
@@ -16,11 +21,17 @@ steps:
|
|||||||
image: ccr.ccs.tencentyun.com/violin/node:24-alpine
|
image: ccr.ccs.tencentyun.com/violin/node:24-alpine
|
||||||
commands:
|
commands:
|
||||||
- npm install
|
- npm install
|
||||||
|
volumes:
|
||||||
|
- name: node-cache
|
||||||
|
path: /root/.npm
|
||||||
|
|
||||||
- name: dev-build
|
- name: dev-build
|
||||||
image: ccr.ccs.tencentyun.com/violin/node:24-alpine
|
image: ccr.ccs.tencentyun.com/violin/node:24-alpine
|
||||||
commands:
|
commands:
|
||||||
- npm run build:h5
|
- npm run build:h5
|
||||||
|
volumes:
|
||||||
|
- name: node-cache
|
||||||
|
path: /root/.npm
|
||||||
|
|
||||||
- name: dev-build-image
|
- name: dev-build-image
|
||||||
image: ccr.ccs.tencentyun.com/violin/drone-kaniko:latest
|
image: ccr.ccs.tencentyun.com/violin/drone-kaniko:latest
|
||||||
@@ -49,6 +60,11 @@ type: kubernetes
|
|||||||
|
|
||||||
name: build-and-deploy-prod
|
name: build-and-deploy-prod
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
- name: node-cache
|
||||||
|
claim:
|
||||||
|
name: node-cache-pvc
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
event:
|
event:
|
||||||
- push
|
- push
|
||||||
@@ -60,11 +76,17 @@ steps:
|
|||||||
image: ccr.ccs.tencentyun.com/violin/node:24-alpine
|
image: ccr.ccs.tencentyun.com/violin/node:24-alpine
|
||||||
commands:
|
commands:
|
||||||
- npm install
|
- npm install
|
||||||
|
volumes:
|
||||||
|
- name: node-cache
|
||||||
|
path: /root/.npm
|
||||||
|
|
||||||
- name: prod-build
|
- name: prod-build
|
||||||
image: ccr.ccs.tencentyun.com/violin/node:24-alpine
|
image: ccr.ccs.tencentyun.com/violin/node:24-alpine
|
||||||
commands:
|
commands:
|
||||||
- npm run build:h5
|
- npm run build:h5
|
||||||
|
volumes:
|
||||||
|
- name: node-cache
|
||||||
|
path: /root/.npm
|
||||||
|
|
||||||
- name: prod-build-image
|
- name: prod-build-image
|
||||||
image: ccr.ccs.tencentyun.com/violin/drone-kaniko:latest
|
image: ccr.ccs.tencentyun.com/violin/drone-kaniko:latest
|
||||||
|
|||||||
Reference in New Issue
Block a user