1. 透過MobaXterm到正式環境去發佈 2. Jenkis打包完會放到 10.36.220.122:/opt/chm/ 3. 透過MobaXterm進入到正式環境10.36.220.122 4. Command : cd /opt/chm 5. Command : /opt/chm/updateCRM.sh false com.cloudbees.plugins.credentials.CredentialsProvider.Create:HH-Admin com.cloudbees.plugins.credentials.CredentialsProvider.Create:scott com.cloudbees.plugins.credentials.CredentialsProvider.Delete:HH-Admin com.cloudbees.plugins.credentials.CredentialsProvider.Delete:scott com.cloudbees.plugins.credentials.CredentialsProvider.ManageDomains:HH-Admin com.cloudbees.plugins.credentials.CredentialsProvider.ManageDomains:scott com.cloudbees.plugins.credentials.CredentialsProvider.Update:HH-Admin com.cloudbees.plugins.credentials.CredentialsProvider.Update:scott com.cloudbees.plugins.credentials.CredentialsProvider.View:HH-Admin com.cloudbees.plugins.credentials.CredentialsProvider.View:scott hudson.model.Item.Build:HH-Admin hudson.model.Item.Build:scott hudson.model.Item.Cancel:HH-Admin hudson.model.Item.Cancel:scott hudson.model.Item.Configure:HH-Admin hudson.model.Item.Configure:scott hudson.model.Item.Delete:HH-Admin hudson.model.Item.Delete:scott hudson.model.Item.Discover:HH-Admin hudson.model.Item.Discover:scott hudson.model.Item.Move:HH-Admin hudson.model.Item.Move:scott hudson.model.Item.Read:HH-Admin hudson.model.Item.Read:scott hudson.model.Item.Workspace:HH-Admin hudson.model.Item.Workspace:scott hudson.model.Run.Delete:HH-Admin hudson.model.Run.Delete:scott hudson.model.Run.Replay:HH-Admin hudson.model.Run.Replay:scott hudson.model.Run.Update:HH-Admin hudson.model.Run.Update:scott hudson.scm.SCM.Tag:HH-Admin hudson.scm.SCM.Tag:scott ylhealth GIT_BRANCH 如 master release/1.15GA hotfix/1.15.1GA master false -1 5 -1 -1 2 https://cm.ylhealth.org/gitlab/ym/CRM.git 3485e854-8389-40e8-8c86-b94e94e91904 */${GIT_BRANCH} false Build_Prod_127 false false false false false org.ylhealth.ym CRM clean process-resources 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 false true true true false true false 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 for /f %%a in ('git describe --tags') do set "tags=%%a" echo Version:%VAR% sed -i "s/<title.*/<title ng-bind='page_title'>CRM %tags%_%version%_%VAR%<\/title\/>/" src\main\resources\static\index.html sed -i "s/<base.*/<base href=\"\/CRM\/\" version=\"%tags%_%version%_%VAR%\"\/>/" src\main\resources\static\indexMinify.html ssh -i F:/jenkins/id_rsa ymadmin@10.36.220.122 "rm -f /opt/chm/CRM-pack.zip" scp -i F:/jenkins/id_rsa target/CRM-pack.zip ymadmin@10.36.220.122:/opt/chm/ UNSTABLE 1 YELLOW true