@echo off
:: 每次发版都需要改的版本号
SET APP_VERSION=0.0.15
SET HOST_NAME=172.18.101.172

SET APP_NAME=gateway
cd %APP_NAME%
copy ..\..\..\..\%APP_NAME%\target\%APP_NAME%.jar app.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%
del app.jar
cd ..

SET APP_NAME=eureka
cd %APP_NAME%
copy ..\..\..\..\%APP_NAME%\target\%APP_NAME%.jar app.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%
del app.jar
cd ..

SET APP_NAME=gdtelgztelschoolcenterapplynet
cd %APP_NAME%
copy ..\..\..\..\apply-net\target\applynet.jar app.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%
del app.jar
cd ..

SET APP_NAME=gdtelgztelschoolcentercore
cd %APP_NAME%
copy ..\..\..\..\core-service\target\core.jar app.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%
del app.jar
cd ..

SET APP_NAME=gdtelgztelschoolcentermanager
cd %APP_NAME%
copy ..\..\..\..\service-manager\target\manager.jar app.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%
del app.jar
cd ..

SET APP_NAME=gdtelgztelschoolcenternewuser
cd %APP_NAME%
copy ..\..\..\..\new-user\target\newuser.jar app.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%
del app.jar
cd ..

SET APP_NAME=gdtelgztelschoolcenterolduser
cd %APP_NAME%
copy ..\..\..\..\old-user\target\olduser.jar app.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%
del app.jar
cd ..

SET APP_NAME=gdtelgztelschoolcentertask
cd %APP_NAME%
copy ..\..\..\..\task\target\task.jar app.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%
del app.jar
cd ..

SET APP_NAME=gdtelgztelschoolcenterrenewaluser
cd %APP_NAME%
copy ..\..\..\..\renewal-user\target\renewaluser.jar app.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%
del app.jar
cd ..

echo FINISH DATE: %date% %time% APP VERSION: %APP_VERSION%