From 27acdb7da0b6291019d7ccd549d82c3cb4f96fed Mon Sep 17 00:00:00 2001 From: "YM-RD-AP01\\ymadmin" Date: Fri, 12 Oct 2018 16:20:12 +0800 Subject: [PATCH] 20140144: Job [Deploy_HRB_DEV_115] configuration updated MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change performed by ·¨¼y°ó --- jobs/Deploy_HRB_DEV_115/config.xml | 37 +++++++++++------------------- 1 file changed, 14 insertions(+), 23 deletions(-) diff --git a/jobs/Deploy_HRB_DEV_115/config.xml b/jobs/Deploy_HRB_DEV_115/config.xml index 8ef549ed..216525d4 100644 --- a/jobs/Deploy_HRB_DEV_115/config.xml +++ b/jobs/Deploy_HRB_DEV_115/config.xml @@ -4,12 +4,12 @@ false - + ylhealth - 2 + -1 5 -1 -1 @@ -85,29 +85,20 @@ - - 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% -"C:\Program Files\Git\usr\bin\sed" -i "s/<base.*/<base href=\"\/\" version=\"v%VAR%\"\/>/" src\main\resources\static\index.html -"C:\Program Files\Git\usr\bin\sed" -i "s/<base.*/<base href=\"\/\" version=\"v%VAR%\"\/>/" src\main\resources\static\login.html - + + VAR=$(git rev-parse --short HEAD)_$(date +"%Y%m%d_%H%M") +version=$(echo $GIT_BRANCH | cut -d'/' -f 3) +sed -i "s/<base.*/<base href=\"\/\" version=\"${version}_${VAR}\"\/>/" src/main/resources/static/index.html +sed -i "s/<base.*/<base href=\"\/\" version=\"${version}_${VAR}\"\/>/" src/main/resources/static/login.html + - - net stop HRB -FOR /F "tokens=5 delims= " %%P IN ('netstat -a -n -o ^| findstr :50501 ^| findstr LISTEN') DO TaskKill.exe /F /PID %%P -del E:\CHM\HRB\lib\*.* /q -"C:\Program Files\7-Zip\7z.exe" e target\HRB-pack.zip -oE:\CHM\HRB\lib HRB\lib\*.* -r -net start HRB - + + sudo systemctl stop hrb +sudo rm -f /opt/HRB/lib/* +sudo 7za e target/HRB-pack.zip -o/opt/HRB/lib/ HRB/lib/*.* -r -y +sudo systemctl start hrb + SUCCESS -- 2.26.2