diff --git a/jobs/Deploy_HRB_Resource_Server_Prod/config.xml b/jobs/Deploy_HRB_Resource_Server_Prod/config.xml new file mode 100644 index 0000000000000000000000000000000000000000..82ad9491f622d8d5924d0684136feebe8a2e2cf0 --- /dev/null +++ b/jobs/Deploy_HRB_Resource_Server_Prod/config.xml @@ -0,0 +1,153 @@ + + + + 打包正式環境用的檔案 + false + + + ylhealth + + + + + GIT_BRANCH + 如 +master +release/1.15GA +hotfix/1.15.1GA + master + false + + + + + + -1 + 5 + -1 + -1 + + + + + 2 + + + https://cm.ylhealth.org/gitlab/ym/HRB_Authorization_Server.git + 3485e854-8389-40e8-8c86-b94e94e91904 + + + + + */${GIT_BRANCH} + + + false + + + + Build_Prod_127 + false + false + false + false + + false + + org.ylhealth.ym.hrb.oauth + authservice + + clean package -Poptimize -Dmaven.test.skip=true -DskipTests=true + spring-boot:run + true + false + true + false + true + true + true + false + false + -1 + false + false + true + + + + + $RD_Group $QA_Group + false + false + true + + + + + + + + + false + + false + false + true + true + true + false + true + true + false + false + false + NONE + false + + + + + + false + + + false + + + xterm + + + + + + 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/<head.*/<head version=\"%version%_%VAR%\"\/>/" src/main/webapp/WEB-INF/jsp/login/login.jsp + + + + + ssh -i F:/jenkins/id_rsa ymadmin@10.36.220.162 "rm -f /opt/HRB_oAuth/authservice-pack.zip" +scp -i F:/jenkins/id_rsa target/authservice-pack.zip ymadmin@10.36.220.162:/opt/HRB_oAuth/ + + + + + SUCCESS + 0 + BLUE + true + + \ No newline at end of file