From a61a15361dc1021f2b8b0d8e5a7a8f492479539d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=BD=E6=B5=B7=E8=8D=A3?= Date: Wed, 7 Aug 2024 10:07:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'.drone.yml'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .drone.yml | 36 +++++++++++++----------------------- 1 file changed, 13 insertions(+), 23 deletions(-) diff --git a/.drone.yml b/.drone.yml index 3c3a7f2..e9b36d2 100644 --- a/.drone.yml +++ b/.drone.yml @@ -5,38 +5,28 @@ name: default steps: - name: build + image: node:16-alpine + pull: if_not_exists + environment: + NODE_ENV: "" + commands: + - yarn install --frozen-lockfile + - env ${NODE_ENV} yarn build + +- name: publish image: docker:dind + pull: if_not_exists volumes: - name: dockersock path: /var/run/docker.sock - name: dockerconfig path: /root/.docker commands: - - docker build -t harbor.picaiba.com/kszny/wms-ui:1.0.0-qy ./ && docker push harbor.picaiba.com/kszny/wms-ui:1.0.0-qy - -- name: deploy - image: harbor.picaiba.com/tools/kubectl:1.19.8 - commands: - - echo "172.27.0.20 lb.kubesphere.local" >> /etc/hosts - #- echo "52.74.223.119 github.com" >> /etc/hosts - - sleep 1 - - kubectl scale --replicas=0 deployment/wms-ui -n wms-qy - - sleep 3 - - kubectl scale --replicas=1 deployment/wms-ui -n wms-qy + - docker build -t hub.kszny.picaiba.com/kszny/plcreader-ui:1.0.0-hnry ./ + - docker push hub.kszny.picaiba.com/kszny/plcreader-ui:1.0.0-hnry depends_on: - build -- name: notification - image: lddsb/drone-dingtalk-message - settings: - token: 37a6483274f6de648a26d6710e4d8160eb7d471752abb2d70f8b7958af58fe11 - type: markdown - secret: SEC83b10f5fefd6127e4073360d4447bb7276a90386aeee1275b2797dd377a903e7 - tpl: http://res.picaiba.com/msg/msg.md - tips_title: 你有新消息 - success_color: 008800 - failure_color: FF0000 - volumes: - name: dockersock host: @@ -49,4 +39,4 @@ trigger: branch: - master event: - - push + - push \ No newline at end of file