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 @@
<description></description>
<keepDependencies>false</keepDependencies>
<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>
</com.dabsquared.gitlabjenkins.connection.GitLabConnectionProperty>
<hudson.model.ParametersDefinitionProperty>
......@@ -106,24 +106,11 @@ hotfix/1.15.1GA</description>
</hudson.plugins.ws__cleanup.PreBuildCleanup>
</buildWrappers>
<prebuilders>
<hudson.tasks.BatchFile>
<command>set path=%path%;&quot;C:\Program Files\Git\usr\bin&quot;;&#xd;
&#xd;
REM 取得今天的年、月、日 (自動補零)&#xd;
SETLOCAL EnableDelayedExpansion&#xd;
&#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.tasks.Shell>
<command>VAR=$(git rev-parse --short HEAD)_$(date +&quot;%Y%m%d_%H%M&quot;)
version=$(echo $GIT_BRANCH | cut -d&apos;/&apos; -f 3)
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>
</hudson.tasks.Shell>
<hudson.plugins.copyartifact.CopyArtifact plugin="copyartifact@1.41">
<project>Deploy_ReportUploader_UAT</project>
<filter>target/ReportUploader*</filter>
......@@ -135,16 +122,14 @@ sed -i &quot;s/&lt;base.*/&lt;base href=\&quot;\/CHMB\/\&quot; version=\&quot;%v
</hudson.plugins.copyartifact.CopyArtifact>
</prebuilders>
<postbuilders>
<hudson.tasks.BatchFile>
<command>set target=C:\CHM\CHMB&#xd;
net stop CRM_HRB&#xd;
FOR /F &quot;tokens=5 delims= &quot; %%P IN (&apos;netstat -a -n -o ^| findstr :50401&apos;) DO TaskKill.exe /F /PID %%P&#xd;
del %target%\lib\*.* /q&#xd;
&quot;C:\Program Files\7-Zip\7z.exe&quot; e target\CHMB-pack.zip -o%target%\lib CHMB\lib\*.* -r&#xd;
xcopy /Y /S src\main\resources\template\* %target%\template&#xd;
xcopy /Y /S src\main\resources\sample\* %target%\sample&#xd;
net start CRM_HRB</command>
</hudson.tasks.BatchFile>
<hudson.tasks.Shell>
<command>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</command>
</hudson.tasks.Shell>
</postbuilders>
<runPostStepsIfResult>
<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