Commit 79c37811 authored by YM-RD-AP01\ymadmin's avatar YM-RD-AP01\ymadmin

20140144: Job [Deploy_CHMB_UAT_136] configuration updated

Change performed by ·¨¼y°ó
parent e51973a9
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<description></description> <description></description>
<keepDependencies>false</keepDependencies> <keepDependencies>false</keepDependencies>
<properties> <properties>
<com.dabsquared.gitlabjenkins.connection.GitLabConnectionProperty plugin="gitlab-plugin@1.5.8"> <com.dabsquared.gitlabjenkins.connection.GitLabConnectionProperty plugin="gitlab-plugin@1.5.9">
<gitLabConnection>ylhealth</gitLabConnection> <gitLabConnection>ylhealth</gitLabConnection>
</com.dabsquared.gitlabjenkins.connection.GitLabConnectionProperty> </com.dabsquared.gitlabjenkins.connection.GitLabConnectionProperty>
<hudson.model.ParametersDefinitionProperty> <hudson.model.ParametersDefinitionProperty>
...@@ -106,24 +106,11 @@ hotfix/1.15.1GA</description> ...@@ -106,24 +106,11 @@ hotfix/1.15.1GA</description>
</hudson.plugins.ws__cleanup.PreBuildCleanup> </hudson.plugins.ws__cleanup.PreBuildCleanup>
</buildWrappers> </buildWrappers>
<prebuilders> <prebuilders>
<hudson.tasks.BatchFile> <hudson.tasks.Shell>
<command>set path=%path%;&quot;C:\Program Files\Git\usr\bin&quot;;&#xd; <command>VAR=$(git rev-parse --short HEAD)_$(date +&quot;%Y%m%d_%H%M&quot;)
&#xd; version=$(echo $GIT_BRANCH | cut -d&apos;/&apos; -f 3)
REM 取得今天的年、月、日 (自動補零)&#xd; sed -i &quot;s/&lt;title.*/&lt;title&gt;CHM Booking Manage v${version}_${VAR}&lt;\/title\/&gt;/&quot; src/main/resources/static/index.html</command>
SETLOCAL EnableDelayedExpansion&#xd; </hudson.tasks.Shell>
&#xd;
for /f &quot;skip=1 tokens=1-6 delims= &quot; %%a in (&apos;wmic path Win32_LocalTime Get Day^,Hour^,Minute^,Month^,Second^,Year /Format:table&apos;) do (&#xd;
IF NOT &quot;%%~f&quot;==&quot;&quot; (&#xd;
set /a FormattedDate=10000 * %%f + 100 * %%d + %%a&#xd;
set FormattedDate=%%f!FormattedDate:~-4,2!!FormattedDate:~-2,2!_%%b:%%c&#xd;
)&#xd;
)&#xd;
for /f &quot;tokens=*&quot; %%i in (&apos;git rev-parse --short HEAD&apos;) do set VAR=%%i_%FormattedDate%&#xd;
for /F &quot;delims=/ tokens=3&quot; %%i in (&quot;%GIT_BRANCH%&quot;) do set version=%%i&#xd;
&#xd;
&#xd;
sed -i &quot;s/&lt;base.*/&lt;base href=\&quot;\/CHMB\/\&quot; version=\&quot;%version%_%VAR%\&quot;\/&gt;/&quot; src\main\resources\static\index.html</command>
</hudson.tasks.BatchFile>
<hudson.plugins.copyartifact.CopyArtifact plugin="copyartifact@1.41"> <hudson.plugins.copyartifact.CopyArtifact plugin="copyartifact@1.41">
<project>Deploy_ReportUploader_UAT</project> <project>Deploy_ReportUploader_UAT</project>
<filter>target/ReportUploader*</filter> <filter>target/ReportUploader*</filter>
...@@ -135,16 +122,14 @@ sed -i &quot;s/&lt;base.*/&lt;base href=\&quot;\/CHMB\/\&quot; version=\&quot;%v ...@@ -135,16 +122,14 @@ sed -i &quot;s/&lt;base.*/&lt;base href=\&quot;\/CHMB\/\&quot; version=\&quot;%v
</hudson.plugins.copyartifact.CopyArtifact> </hudson.plugins.copyartifact.CopyArtifact>
</prebuilders> </prebuilders>
<postbuilders> <postbuilders>
<hudson.tasks.BatchFile> <hudson.tasks.Shell>
<command>set target=C:\CHM\CHMB&#xd; <command>sudo systemctl stop CHMB
net stop CRM_HRB&#xd; rm -f /opt/chm/chmb/lib/*
FOR /F &quot;tokens=5 delims= &quot; %%P IN (&apos;netstat -a -n -o ^| findstr :50401&apos;) DO TaskKill.exe /F /PID %%P&#xd; 7za e target/CHMB-pack.zip -o/opt/chm/chmb/lib/ CHMB\lib\*.* -r
del %target%\lib\*.* /q&#xd; 7za e target/CHMB-pack.zip -o/opt/chm/chmb/template/ CHMB\template\*.* -r
&quot;C:\Program Files\7-Zip\7z.exe&quot; e target\CHMB-pack.zip -o%target%\lib CHMB\lib\*.* -r&#xd; 7za e target/CHMB-pack.zip -o/opt/chm/chmb/sample/ CHMB\sample\*.* -r
xcopy /Y /S src\main\resources\template\* %target%\template&#xd; sudo systemctl start CHMB</command>
xcopy /Y /S src\main\resources\sample\* %target%\sample&#xd; </hudson.tasks.Shell>
net start CRM_HRB</command>
</hudson.tasks.BatchFile>
</postbuilders> </postbuilders>
<runPostStepsIfResult> <runPostStepsIfResult>
<name>SUCCESS</name> <name>SUCCESS</name>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment