From 79c3781180a8f9e47828cf6a6ace576bc258a241 Mon Sep 17 00:00:00 2001 From: "YM-RD-AP01\\ymadmin" Date: Mon, 30 Jul 2018 15:15:20 +0800 Subject: [PATCH] 20140144: Job [Deploy_CHMB_UAT_136] configuration updated MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change performed by ·¨¼y°ó --- jobs/Deploy_CHMB_UAT_136/config.xml | 43 ++++++++++------------------- 1 file changed, 14 insertions(+), 29 deletions(-) diff --git a/jobs/Deploy_CHMB_UAT_136/config.xml b/jobs/Deploy_CHMB_UAT_136/config.xml index 87817bc9..e02c88c5 100644 --- a/jobs/Deploy_CHMB_UAT_136/config.xml +++ b/jobs/Deploy_CHMB_UAT_136/config.xml @@ -4,7 +4,7 @@ false - + ylhealth @@ -106,24 +106,11 @@ hotfix/1.15.1GA - - set path=%path%;"C:\Program Files\Git\usr\bin"; - -REM 取得今天的年、月、日 (自動補零) -SETLOCAL EnableDelayedExpansion - -for /f "skip=1 tokens=1-6 delims= " %%a in ('wmic path Win32_LocalTime Get Day^,Hour^,Minute^,Month^,Second^,Year /Format:table') do ( - IF NOT "%%~f"=="" ( - set /a FormattedDate=10000 * %%f + 100 * %%d + %%a - set FormattedDate=%%f!FormattedDate:~-4,2!!FormattedDate:~-2,2!_%%b:%%c - ) -) -for /f "tokens=*" %%i in ('git rev-parse --short HEAD') do set VAR=%%i_%FormattedDate% -for /F "delims=/ tokens=3" %%i in ("%GIT_BRANCH%") do set version=%%i - - -sed -i "s/<base.*/<base href=\"\/CHMB\/\" version=\"%version%_%VAR%\"\/>/" src\main\resources\static\index.html - + + VAR=$(git rev-parse --short HEAD)_$(date +"%Y%m%d_%H%M") +version=$(echo $GIT_BRANCH | cut -d'/' -f 3) +sed -i "s/<title.*/<title>CHM Booking Manage v${version}_${VAR}<\/title\/>/" src/main/resources/static/index.html + Deploy_ReportUploader_UAT target/ReportUploader* @@ -135,16 +122,14 @@ sed -i "s/<base.*/<base href=\"\/CHMB\/\" version=\"%v - - set target=C:\CHM\CHMB -net stop CRM_HRB -FOR /F "tokens=5 delims= " %%P IN ('netstat -a -n -o ^| findstr :50401') DO TaskKill.exe /F /PID %%P -del %target%\lib\*.* /q -"C:\Program Files\7-Zip\7z.exe" e target\CHMB-pack.zip -o%target%\lib CHMB\lib\*.* -r -xcopy /Y /S src\main\resources\template\* %target%\template -xcopy /Y /S src\main\resources\sample\* %target%\sample -net start CRM_HRB - + + sudo systemctl stop CHMB +rm -f /opt/chm/chmb/lib/* +7za e target/CHMB-pack.zip -o/opt/chm/chmb/lib/ CHMB\lib\*.* -r +7za e target/CHMB-pack.zip -o/opt/chm/chmb/template/ CHMB\template\*.* -r +7za e target/CHMB-pack.zip -o/opt/chm/chmb/sample/ CHMB\sample\*.* -r +sudo systemctl start CHMB + SUCCESS -- 2.26.2