ci(custom): update cicd
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-03-08 18:48:37 +08:00
parent 1c729f1e35
commit 93bda1fa29

View File

@@ -8,6 +8,7 @@ platform:
steps: steps:
- name: 测试服-依赖安装&&编译打包 - name: 测试服-依赖安装&&编译打包
pull: if-not-exists
image: node:20-alpine image: node:20-alpine
when: when:
branch: branch:
@@ -22,6 +23,7 @@ steps:
- tar -zcvf dist.tar ./dist ./default.conf ./Dockerfile - tar -zcvf dist.tar ./dist ./default.conf ./Dockerfile
- name: 正式服-依赖安装&&编译打包 - name: 正式服-依赖安装&&编译打包
pull: if-not-exists
image: node:20-alpine image: node:20-alpine
when: when:
branch: branch:
@@ -36,6 +38,7 @@ steps:
- tar -zcvf dist.tar ./dist ./default.conf ./Dockerfile - tar -zcvf dist.tar ./dist ./default.conf ./Dockerfile
- name: 测试服-产物上传 - name: 测试服-产物上传
pull: if-not-exists
image: appleboy/drone-scp image: appleboy/drone-scp
when: when:
branch: branch:
@@ -54,6 +57,7 @@ steps:
- ./dist.tar - ./dist.tar
- name: 测试服-部署 - name: 测试服-部署
pull: if-not-exists
image: appleboy/drone-ssh image: appleboy/drone-ssh
when: when:
branch: branch:
@@ -81,11 +85,12 @@ steps:
- else - else
- echo "容器不存在" - echo "容器不存在"
- fi - fi
- docker run -d -p 8082:80 --restart=always --name jdt-admin-dev jdt-admin-dev - docker run -d -p 8085:80 --restart=always --name jdt-admin-dev jdt-admin-dev
- cd .. - cd ..
- rm -rf jdt-admin-dev - rm -rf jdt-admin-dev
- name: 正式服-产物上传 - name: 正式服-产物上传
pull: if-not-exists
image: appleboy/drone-scp image: appleboy/drone-scp
when: when:
branch: branch:
@@ -104,6 +109,7 @@ steps:
- ./dist.tar - ./dist.tar
- name: 正式服-部署 - name: 正式服-部署
pull: if-not-exists
image: appleboy/drone-ssh image: appleboy/drone-ssh
when: when:
branch: branch:
@@ -135,7 +141,8 @@ steps:
- cd .. - cd ..
- rm -rf jdt-admin-prod - rm -rf jdt-admin-prod
- name: 微信通知 - name: 企业微信通知
pull: if-not-exists
image: plugins/webhook image: plugins/webhook
when: when:
status: status: