#!/bin/bash

HOST_NAME=172.18.101.172
# 每次发版都需要改的版本号
APP_VERSION=0.0.1

APP_NAME=gateway
cd $APP_NAME
cp ../../../../$APP_NAME/target/$APP_NAME.jar $APP_NAME.jar
docker build -t $HOST_NAME/gdtel-gztel-school-center/$APP_NAME:$APP_VERSION . && docker push $HOST_NAME/gdtel-gztel-school-center/$APP_NAME:$APP_VERSION
rm -rf *.jar

APP_NAME=eureka
cd ../$APP_NAME
cp ../../../../$APP_NAME/target/$APP_NAME.jar $APP_NAME.jar
docker build -t $HOST_NAME/gdtel-gztel-school-center/$APP_NAME:$APP_VERSION . && docker push $HOST_NAME/gdtel-gztel-school-center/$APP_NAME:$APP_VERSION
rm -rf *.jar

APP_NAME=gdtelgztelschoolcenterapplynet
cd ../$APP_NAME
cp ../../../../apply-net/target/applynet.jar applynet.jar
docker build -t $HOST_NAME/gdtel-gztel-school-center/$APP_NAME:$APP_VERSION . && docker push $HOST_NAME/gdtel-gztel-school-center/$APP_NAME:$APP_VERSION
rm -rf *.jar

APP_NAME=gdtelgztelschoolcentercore
cd ../$APP_NAME
cp ../../../../core-service/target/core.jar core.jar
docker build -t $HOST_NAME/gdtel-gztel-school-center/$APP_NAME:$APP_VERSION . && docker push $HOST_NAME/gdtel-gztel-school-center/$APP_NAME:$APP_VERSION
rm -rf *.jar

APP_NAME=gdtelgztelschoolcentermanager
cd ../$APP_NAME
cp ../../../../service-manager/target/manager.jar manager.jar
docker build -t $HOST_NAME/gdtel-gztel-school-center/$APP_NAME:$APP_VERSION . && docker push $HOST_NAME/gdtel-gztel-school-center/$APP_NAME:$APP_VERSION
rm -rf *.jar

APP_NAME=gdtelgztelschoolcenternewuser
cd ../$APP_NAME
cp ../../../../new-user/target/newuser.jar newuser.jar
docker build -t $HOST_NAME/gdtel-gztel-school-center/$APP_NAME:$APP_VERSION . && docker push $HOST_NAME/gdtel-gztel-school-center/$APP_NAME:$APP_VERSION
rm -rf *.jar

APP_NAME=gdtelgztelschoolcenterolduser
cd ../$APP_NAME
cp ../../../../old-user/target/olduser.jar olduser.jar
docker build -t $HOST_NAME/gdtel-gztel-school-center/$APP_NAME:$APP_VERSION . && docker push $HOST_NAME/gdtel-gztel-school-center/$APP_NAME:$APP_VERSION
rm -rf *.jar

APP_NAME=gdtelgztelschoolcentertask
cd ../$APP_NAME
cp ../../../../old-user/target/task.jar task.jar
docker build -t $HOST_NAME/gdtel-gztel-school-center/$APP_NAME:$APP_VERSION . && docker push $HOST_NAME/gdtel-gztel-school-center/$APP_NAME:$APP_VERSION
rm -rf *.jar