Merge pull request 'feat: 🚀 添加部署master分支功能' (#9) from cicd into master
Reviewed-on: #9
Este cometimento está contido em:
cometimento
25d21ef884
@ -11,16 +11,16 @@ steps:
|
|||||||
- name: dockerconfig
|
- name: dockerconfig
|
||||||
path: /root/.docker
|
path: /root/.docker
|
||||||
commands:
|
commands:
|
||||||
- docker build -t harbor.picaiba.com/kszny/mes-api:1.0.0-india ./ && docker push harbor.picaiba.com/kszny/mes-api:1.0.0-india
|
- docker build -t harbor.picaiba.com/kszny/mes-api:1.0.0-cigs4 ./ && docker push harbor.picaiba.com/kszny/mes-api:1.0.0-cigs4
|
||||||
|
|
||||||
- name: deploy
|
- name: deploy
|
||||||
image: harbor.picaiba.com/tools/kubectl
|
image: harbor.picaiba.com/tools/kubectl
|
||||||
commands:
|
commands:
|
||||||
- echo "172.27.0.20 lb.kubesphere.local" >> /etc/hosts
|
- echo "172.27.0.20 lb.kubesphere.local" >> /etc/hosts
|
||||||
- sleep 1
|
- sleep 1
|
||||||
- kubectl scale --replicas=0 deployment/mes-api -n mes-india
|
- kubectl scale --replicas=0 deployment/mes-api -n mes-cigs4
|
||||||
- sleep 3
|
- sleep 3
|
||||||
- kubectl scale --replicas=1 deployment/mes-api -n mes-india
|
- kubectl scale --replicas=1 deployment/mes-api -n mes-cigs4
|
||||||
depends_on:
|
depends_on:
|
||||||
- build
|
- build
|
||||||
|
|
||||||
@ -34,6 +34,6 @@ volumes:
|
|||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
branch:
|
branch:
|
||||||
- porject/yd-monitor
|
- master
|
||||||
event:
|
event:
|
||||||
- push
|
- push
|
||||||
|
@ -49,7 +49,7 @@ ENV TZ="Asia/Shanghai"
|
|||||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||||
# 定义一些环境变量,方便环境变量传参
|
# 定义一些环境变量,方便环境变量传参
|
||||||
ENV JVM_OPTS=""
|
ENV JVM_OPTS=""
|
||||||
ENV JAVA_OPTS="-Dspring.profiles.active=dev"
|
ENV JAVA_OPTS=""
|
||||||
# 指定暴露的端口,起到说明的作用,不指定也会暴露对应端口
|
# 指定暴露的端口,起到说明的作用,不指定也会暴露对应端口
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
# 启动 jar 的命令
|
# 启动 jar 的命令
|
||||||
|
Carregando…
Criar uma nova questão referindo esta
Bloquear um utilizador