Merge pull request 'fix: 🐛 修正构建脚本' (#12) from cicd into develop
Some checks failed
continuous-integration/drone/push Build is failing

Reviewed-on: #12
This commit is contained in:
施海荣 2022-02-23 11:42:46 +08:00
commit aa15b551fb
2 changed files with 4 additions and 6 deletions

View File

@ -12,7 +12,7 @@ steps:
- name: dockerconfig
path: /root/.docker
commands:
- docker build -t harbor.picaiba.com/mes/mes-cigs-ui ./ && docker push harbor.picaiba.com/mes/mes-cigs-ui
- docker build -t harbor.picaiba.com/kszny/wms-ui:00a-1.0.0 ./ && docker push harbor.picaiba.com/kszny/wms-ui:00a-1.0.0
- name: deploy
image: harbor.picaiba.com/tools/kubectl:1.19.8
@ -20,9 +20,9 @@ steps:
- 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/mes-ui -n mes-cigs
- kubectl scale --replicas=0 deployment/a-wms-ui -n wms
- sleep 3
- kubectl scale --replicas=1 deployment/mes-ui -n mes-cigs
- kubectl scale --replicas=1 deployment/a-wms-ui -n wms
depends_on:
- build

View File

@ -1,9 +1,7 @@
FROM node:12 AS builder
WORKDIR /app
ADD package.json /app/
RUN npm install \
--registry=https://registry.npm.taobao.org \
--disturl=https://npm.taobao.org/dist
RUN npm config set registry https://registry.npmmirror.com && npm install
ADD . /app
RUN npm run build:prod