Commit 27acdb7d authored by YM-RD-AP01\ymadmin's avatar YM-RD-AP01\ymadmin

20140144: Job [Deploy_HRB_DEV_115] configuration updated

Change performed by ·¨¼y°ó
parent cc34c4a9
......@@ -4,12 +4,12 @@
<description></description>
<keepDependencies>false</keepDependencies>
<properties>
<com.dabsquared.gitlabjenkins.connection.GitLabConnectionProperty plugin="gitlab-plugin@1.5.9">
<com.dabsquared.gitlabjenkins.connection.GitLabConnectionProperty plugin="gitlab-plugin@1.5.10">
<gitLabConnection>ylhealth</gitLabConnection>
</com.dabsquared.gitlabjenkins.connection.GitLabConnectionProperty>
<jenkins.model.BuildDiscarderProperty>
<strategy class="hudson.tasks.LogRotator">
<daysToKeep>2</daysToKeep>
<daysToKeep>-1</daysToKeep>
<numToKeep>5</numToKeep>
<artifactDaysToKeep>-1</artifactDaysToKeep>
<artifactNumToKeep>-1</artifactNumToKeep>
......@@ -85,29 +85,20 @@
<publishers/>
<buildWrappers/>
<prebuilders>
<hudson.tasks.BatchFile>
<command>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;
&quot;C:\Program Files\Git\usr\bin\sed&quot; -i &quot;s/&lt;base.*/&lt;base href=\&quot;\/\&quot; version=\&quot;v%VAR%\&quot;\/&gt;/&quot; src\main\resources\static\index.html&#xd;
&quot;C:\Program Files\Git\usr\bin\sed&quot; -i &quot;s/&lt;base.*/&lt;base href=\&quot;\/\&quot; version=\&quot;v%VAR%\&quot;\/&gt;/&quot; src\main\resources\static\login.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;base.*/&lt;base href=\&quot;\/\&quot; version=\&quot;${version}_${VAR}\&quot;\/&gt;/&quot; src/main/resources/static/index.html
sed -i &quot;s/&lt;base.*/&lt;base href=\&quot;\/\&quot; version=\&quot;${version}_${VAR}\&quot;\/&gt;/&quot; src/main/resources/static/login.html</command>
</hudson.tasks.Shell>
</prebuilders>
<postbuilders>
<hudson.tasks.BatchFile>
<command>net stop HRB&#xd;
FOR /F &quot;tokens=5 delims= &quot; %%P IN (&apos;netstat -a -n -o ^| findstr :50501 ^| findstr LISTEN&apos;) DO TaskKill.exe /F /PID %%P&#xd;
del E:\CHM\HRB\lib\*.* /q&#xd;
&quot;C:\Program Files\7-Zip\7z.exe&quot; e target\HRB-pack.zip -oE:\CHM\HRB\lib HRB\lib\*.* -r&#xd;
net start HRB</command>
</hudson.tasks.BatchFile>
<hudson.tasks.Shell>
<command>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</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