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 @@ ...@@ -4,12 +4,12 @@
<description></description> <description></description>
<keepDependencies>false</keepDependencies> <keepDependencies>false</keepDependencies>
<properties> <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> <gitLabConnection>ylhealth</gitLabConnection>
</com.dabsquared.gitlabjenkins.connection.GitLabConnectionProperty> </com.dabsquared.gitlabjenkins.connection.GitLabConnectionProperty>
<jenkins.model.BuildDiscarderProperty> <jenkins.model.BuildDiscarderProperty>
<strategy class="hudson.tasks.LogRotator"> <strategy class="hudson.tasks.LogRotator">
<daysToKeep>2</daysToKeep> <daysToKeep>-1</daysToKeep>
<numToKeep>5</numToKeep> <numToKeep>5</numToKeep>
<artifactDaysToKeep>-1</artifactDaysToKeep> <artifactDaysToKeep>-1</artifactDaysToKeep>
<artifactNumToKeep>-1</artifactNumToKeep> <artifactNumToKeep>-1</artifactNumToKeep>
...@@ -85,29 +85,20 @@ ...@@ -85,29 +85,20 @@
<publishers/> <publishers/>
<buildWrappers/> <buildWrappers/>
<prebuilders> <prebuilders>
<hudson.tasks.BatchFile> <hudson.tasks.Shell>
<command>REM 取得今天的年、月、日 (自動補零)&#xd; <command>VAR=$(git rev-parse --short HEAD)_$(date +&quot;%Y%m%d_%H%M&quot;)
SETLOCAL EnableDelayedExpansion&#xd; version=$(echo $GIT_BRANCH | cut -d&apos;/&apos; -f 3)
&#xd; sed -i &quot;s/&lt;base.*/&lt;base href=\&quot;\/\&quot; version=\&quot;${version}_${VAR}\&quot;\/&gt;/&quot; src/main/resources/static/index.html
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; 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>
IF NOT &quot;%%~f&quot;==&quot;&quot; (&#xd; </hudson.tasks.Shell>
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>
</prebuilders> </prebuilders>
<postbuilders> <postbuilders>
<hudson.tasks.BatchFile> <hudson.tasks.Shell>
<command>net stop HRB&#xd; <command>sudo systemctl stop hrb
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; sudo rm -f /opt/HRB/lib/*
del E:\CHM\HRB\lib\*.* /q&#xd; sudo 7za e target/HRB-pack.zip -o/opt/HRB/lib/ HRB/lib/*.* -r -y
&quot;C:\Program Files\7-Zip\7z.exe&quot; e target\HRB-pack.zip -oE:\CHM\HRB\lib HRB\lib\*.* -r&#xd; sudo systemctl start hrb</command>
net start HRB</command> </hudson.tasks.Shell>
</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