From 4bd0df94ff71bb6c428835e539940b956b614d00 Mon Sep 17 00:00:00 2001 From: zhaoxiaolin Date: Tue, 7 Nov 2023 15:07:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E7=89=88=E5=91=BD=E4=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- op-modules/op-mes/push-mes.bat | 41 ++++++++++++++++++++ op-modules/op-plan/push-plan.bat | 41 ++++++++++++++++++++ op-modules/op-quality/push-quality.bat | 40 +++++++++++++++++++ op-modules/op-technology/push-technology.bat | 40 +++++++++++++++++++ op-modules/op-wms/push-wms.bat | 40 +++++++++++++++++++ 5 files changed, 202 insertions(+) create mode 100644 op-modules/op-mes/push-mes.bat create mode 100644 op-modules/op-plan/push-plan.bat create mode 100644 op-modules/op-quality/push-quality.bat create mode 100644 op-modules/op-technology/push-technology.bat create mode 100644 op-modules/op-wms/push-wms.bat diff --git a/op-modules/op-mes/push-mes.bat b/op-modules/op-mes/push-mes.bat new file mode 100644 index 00000000..e95aae00 --- /dev/null +++ b/op-modules/op-mes/push-mes.bat @@ -0,0 +1,41 @@ +@echo off +echo --------------------------------自定义参数,启动前先修改-------------------------------------- +set jarName=op-modules-mes.jar +set profile=dev +set imageURI=192.168.202.36:30002/op-lanju/op-mes +rem echo 获取当前日期字符串 +for /f "tokens=1,2,3 delims=/- " %%a in ("%date%") do @set D=%%a%%b%%c +rem echo 获取当前时间字符串 +for /f "tokens=1,2 delims=:." %%a in ("%time%") do @set T=%%a%%b +rem echo 如当前小时小于10,将空格替换为0 +set T=%T: =0% +rem echo 显示输出日期时间字符串 +set imageVersion=%D%%T% +::输出发版信息 +echo jar包名称:%jarName% +echo 启动环境:%profile% +echo 镜像库地址:%imageURI% +echo 镜像版本:%imageVersion% + +echo --------------------------------mvn package...-------------------------------- +::call mvn clean package -Dmaven.test.skip=true + +cd .\target +SET df=Dockerfile +if exist %df% ( + del /f /s /q .\Dockerfile +) +echo --------------------------------创建Dockerfile-------------------------------- +echo FROM 192.168.202.36:30002/library/openjdk:8u131-jdk-alpine >> Dockerfile +echo RUN apk add --update font-adobe-100dpi ttf-dejavu fontconfig +echo COPY %jarName% /application.jar >> Dockerfile +echo RUN echo "Asia/Shanghai" ^> /etc/timezone >> Dockerfile +echo CMD ["java", "-jar", "-Dspring.profiles.active=%profile%", "application.jar"] >> Dockerfile +dir +echo --------------------------------docker login...------------------------------- +docker login 192.168.202.36:30002 -u deploy -p Deploy@2023 +echo --------------------------------docker build...------------------------------- +docker build -t %imageURI%:%imageVersion% . +echo --------------------------------docker push...-------------------------------- +docker push %imageURI%:%imageVersion% +@pause \ No newline at end of file diff --git a/op-modules/op-plan/push-plan.bat b/op-modules/op-plan/push-plan.bat new file mode 100644 index 00000000..645c2921 --- /dev/null +++ b/op-modules/op-plan/push-plan.bat @@ -0,0 +1,41 @@ +@echo off +echo --------------------------------自定义参数,启动前先修改-------------------------------------- +set jarName=op-modules-plan.jar +set profile=dev +set imageURI=192.168.202.36:30002/op-lanju/op-plan +rem echo 获取当前日期字符串 +for /f "tokens=1,2,3 delims=/- " %%a in ("%date%") do @set D=%%a%%b%%c +rem echo 获取当前时间字符串 +for /f "tokens=1,2 delims=:." %%a in ("%time%") do @set T=%%a%%b +rem echo 如当前小时小于10,将空格替换为0 +set T=%T: =0% +rem echo 显示输出日期时间字符串 +set imageVersion=%D%%T% +::输出发版信息 +echo jar包名称:%jarName% +echo 启动环境:%profile% +echo 镜像库地址:%imageURI% +echo 镜像版本:%imageVersion% + +echo --------------------------------mvn package...-------------------------------- +::call mvn clean package -Dmaven.test.skip=true + +cd .\target +SET df=Dockerfile +if exist %df% ( + del /f /s /q .\Dockerfile +) +echo --------------------------------创建Dockerfile-------------------------------- +echo FROM 192.168.202.36:30002/library/openjdk:8u131-jdk-alpine >> Dockerfile +echo RUN apk add --update font-adobe-100dpi ttf-dejavu fontconfig +echo COPY %jarName% /application.jar >> Dockerfile +echo RUN echo "Asia/Shanghai" ^> /etc/timezone >> Dockerfile +echo CMD ["java", "-jar", "-Dspring.profiles.active=%profile%", "application.jar"] >> Dockerfile +dir +echo --------------------------------docker login...------------------------------- +docker login 192.168.202.36:30002 -u deploy -p Deploy@2023 +echo --------------------------------docker build...------------------------------- +docker build -t %imageURI%:%imageVersion% . +echo --------------------------------docker push...-------------------------------- +docker push %imageURI%:%imageVersion% +@pause \ No newline at end of file diff --git a/op-modules/op-quality/push-quality.bat b/op-modules/op-quality/push-quality.bat new file mode 100644 index 00000000..e53c0253 --- /dev/null +++ b/op-modules/op-quality/push-quality.bat @@ -0,0 +1,40 @@ +@echo off +echo --------------------------------自定义参数,启动前先修改-------------------------------------- +set jarName=op-modules-quality.jar +set profile=dev +set imageURI=192.168.202.36:30002/op-lanju/op-quality +rem echo 获取当前日期字符串 +for /f "tokens=1,2,3 delims=/- " %%a in ("%date%") do @set D=%%a%%b%%c +rem echo 获取当前时间字符串 +for /f "tokens=1,2 delims=:." %%a in ("%time%") do @set T=%%a%%b +rem echo 如当前小时小于10,将空格替换为0 +set T=%T: =0% +rem echo 显示输出日期时间字符串 +set imageVersion=%D%%T% +::输出发版信息 +echo jar包名称:%jarName% +echo 启动环境:%profile% +echo 镜像库地址:%imageURI% +echo 镜像版本:%imageVersion% + +echo --------------------------------mvn package...-------------------------------- +::call mvn clean package -Dmaven.test.skip=true + +cd .\target +SET df=Dockerfile +if exist %df% ( + del /f /s /q .\Dockerfile +) +echo --------------------------------创建Dockerfile-------------------------------- +echo FROM 192.168.202.36:30002/library/openjdk:8u131-jdk-alpine >> Dockerfile +echo COPY %jarName% /application.jar >> Dockerfile +echo RUN echo "Asia/Shanghai" ^> /etc/timezone >> Dockerfile +echo CMD ["java", "-jar", "-Dspring.profiles.active=%profile%", "application.jar"] >> Dockerfile +dir +echo --------------------------------docker login...------------------------------- +docker login 192.168.202.36:30002 -u deploy -p Deploy@2023 +echo --------------------------------docker build...------------------------------- +docker build -t %imageURI%:%imageVersion% . +echo --------------------------------docker push...-------------------------------- +docker push %imageURI%:%imageVersion% +@pause \ No newline at end of file diff --git a/op-modules/op-technology/push-technology.bat b/op-modules/op-technology/push-technology.bat new file mode 100644 index 00000000..5ba367d8 --- /dev/null +++ b/op-modules/op-technology/push-technology.bat @@ -0,0 +1,40 @@ +@echo off +echo --------------------------------自定义参数,启动前先修改-------------------------------------- +set jarName=op-modules-technology.jar +set profile=dev +set imageURI=192.168.202.36:30002/op-lanju/op-technology +rem echo 获取当前日期字符串 +for /f "tokens=1,2,3 delims=/- " %%a in ("%date%") do @set D=%%a%%b%%c +rem echo 获取当前时间字符串 +for /f "tokens=1,2 delims=:." %%a in ("%time%") do @set T=%%a%%b +rem echo 如当前小时小于10,将空格替换为0 +set T=%T: =0% +rem echo 显示输出日期时间字符串 +set imageVersion=%D%%T% +::输出发版信息 +echo jar包名称:%jarName% +echo 启动环境:%profile% +echo 镜像库地址:%imageURI% +echo 镜像版本:%imageVersion% + +echo --------------------------------mvn package...-------------------------------- +::call mvn clean package -Dmaven.test.skip=true + +cd .\target +SET df=Dockerfile +if exist %df% ( + del /f /s /q .\Dockerfile +) +echo --------------------------------创建Dockerfile-------------------------------- +echo FROM 192.168.202.36:30002/library/openjdk:8u131-jdk-alpine >> Dockerfile +echo COPY %jarName% /application.jar >> Dockerfile +echo RUN echo "Asia/Shanghai" ^> /etc/timezone >> Dockerfile +echo CMD ["java", "-jar", "-Dspring.profiles.active=%profile%", "application.jar"] >> Dockerfile +dir +echo --------------------------------docker login...------------------------------- +docker login 192.168.202.36:30002 -u deploy -p Deploy@2023 +echo --------------------------------docker build...------------------------------- +docker build -t %imageURI%:%imageVersion% . +echo --------------------------------docker push...-------------------------------- +docker push %imageURI%:%imageVersion% +@pause \ No newline at end of file diff --git a/op-modules/op-wms/push-wms.bat b/op-modules/op-wms/push-wms.bat new file mode 100644 index 00000000..080ce1b8 --- /dev/null +++ b/op-modules/op-wms/push-wms.bat @@ -0,0 +1,40 @@ +@echo off +echo --------------------------------自定义参数,启动前先修改-------------------------------------- +set jarName=op-modules-wms.jar +set profile=dev +set imageURI=192.168.202.36:30002/op-lanju/op-wms +rem echo 获取当前日期字符串 +for /f "tokens=1,2,3 delims=/- " %%a in ("%date%") do @set D=%%a%%b%%c +rem echo 获取当前时间字符串 +for /f "tokens=1,2 delims=:." %%a in ("%time%") do @set T=%%a%%b +rem echo 如当前小时小于10,将空格替换为0 +set T=%T: =0% +rem echo 显示输出日期时间字符串 +set imageVersion=%D%%T% +::输出发版信息 +echo jar包名称:%jarName% +echo 启动环境:%profile% +echo 镜像库地址:%imageURI% +echo 镜像版本:%imageVersion% + +echo --------------------------------mvn package...-------------------------------- +::call mvn clean package -Dmaven.test.skip=true + +cd .\target +SET df=Dockerfile +if exist %df% ( + del /f /s /q .\Dockerfile +) +echo --------------------------------创建Dockerfile-------------------------------- +echo FROM 192.168.202.36:30002/library/openjdk:8u131-jdk-alpine >> Dockerfile +echo COPY %jarName% /application.jar >> Dockerfile +echo RUN echo "Asia/Shanghai" ^> /etc/timezone >> Dockerfile +echo CMD ["java", "-jar", "-Dspring.profiles.active=%profile%", "application.jar"] >> Dockerfile +dir +echo --------------------------------docker login...------------------------------- +docker login 192.168.202.36:30002 -u deploy -p Deploy@2023 +echo --------------------------------docker build...------------------------------- +docker build -t %imageURI%:%imageVersion% . +echo --------------------------------docker push...-------------------------------- +docker push %imageURI%:%imageVersion% +@pause \ No newline at end of file