mt-ck-wms-ui/.drone.yml

42 строки
853 B
YAML
Исходник Обычный вид История

2021-09-13 14:56:28 +08:00
---
kind: pipeline
type: docker
name: default
steps:
- name: build
image: docker:dind
volumes:
- name: dockersock
path: /var/run/docker.sock
- name: dockerconfig
path: /root/.docker
commands:
2022-02-23 11:40:13 +08:00
- 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
2021-09-13 14:56:28 +08:00
- 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
2022-02-23 11:40:13 +08:00
- kubectl scale --replicas=0 deployment/a-wms-ui -n wms
2021-09-13 14:56:28 +08:00
- sleep 3
2022-02-23 11:40:13 +08:00
- kubectl scale --replicas=1 deployment/a-wms-ui -n wms
2021-09-13 14:56:28 +08:00
depends_on:
- build
volumes:
- name: dockersock
host:
path: /var/run/docker.sock
- name: dockerconfig
host:
path: /root/.docker
trigger:
branch:
- develop
event:
- push