|
|
|
@ -19,9 +19,9 @@ volumes:
@@ -19,9 +19,9 @@ volumes:
|
|
|
|
|
- name: node-cache |
|
|
|
|
host: |
|
|
|
|
path: /data/drone/node/cache |
|
|
|
|
- name: node-build |
|
|
|
|
- name: node-modules |
|
|
|
|
host: |
|
|
|
|
path: /data/drone/node/build |
|
|
|
|
path: /data/drone/node/node_modules |
|
|
|
|
- name: docker-sock |
|
|
|
|
host: |
|
|
|
|
path: /var/run/docker.sock |
|
|
|
@ -36,19 +36,16 @@ steps:
@@ -36,19 +36,16 @@ steps:
|
|
|
|
|
image: node:16.17.0 |
|
|
|
|
volumes: |
|
|
|
|
- name: node-cache |
|
|
|
|
path: /node_modules |
|
|
|
|
- name: node-build |
|
|
|
|
path: /app/build |
|
|
|
|
path: /node_cache |
|
|
|
|
- name: node-modules |
|
|
|
|
path: /drone/src/node_modules |
|
|
|
|
commands: |
|
|
|
|
- echo 'node package start' |
|
|
|
|
# 打包 |
|
|
|
|
- npm config set cache /node_modules --global |
|
|
|
|
- npm run pre --force |
|
|
|
|
- npm config set cache /node_cache --global |
|
|
|
|
- npm run pre |
|
|
|
|
- npm install |
|
|
|
|
- npm run build |
|
|
|
|
# 拷贝打包结果到宿主机 |
|
|
|
|
- mkdir -p /app/build/db-bastion-vue |
|
|
|
|
- cp -R dist/ /app/build/db-bastion-vue/ |
|
|
|
|
|
|
|
|
|
# 构建镜像 |
|
|
|
|
- name: build-image |
|
|
|
|