Commit 0afd610d authored by YM-RD-AP01\ymadmin's avatar YM-RD-AP01\ymadmin

20140144: Job [Deploy_CHM_DEV_115] configuration updated

Change performed by ·¨¼y°ó
parent 9dd51da7
...@@ -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>
...@@ -83,32 +83,35 @@ ...@@ -83,32 +83,35 @@
</hudson.maven.reporters.MavenMailer> </hudson.maven.reporters.MavenMailer>
</reporters> </reporters>
<publishers/> <publishers/>
<buildWrappers/> <buildWrappers>
<hudson.plugins.timestamper.TimestamperBuildWrapper plugin="timestamper@1.8.10"/>
</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;title.*/&lt;title ng-bind=&apos;page_title&apos;&gt;CRM v${version}_${VAR}&lt;\/title\/&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;title.*/&lt;title ng-bind=&apos;page_title&apos;&gt;CRM v${version}_${VAR}&lt;\/title\/&gt;/&quot; src/main/resources/static/indexMinify.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;title.*/&lt;title ng-bind=&apos;page_title&apos;&gt;CRM v%VAR%&lt;\/title\/&gt;/&quot; src\main\resources\static\index.html&#xd;
&quot;C:\Program Files\Git\usr\bin\sed&quot; -i &quot;s/&lt;title.*/&lt;title ng-bind=&apos;page_title&apos;&gt;CRM v%VAR%&lt;\/title\/&gt;/&quot; src\main\resources\static\indexMinify.html</command>
</hudson.tasks.BatchFile>
</prebuilders> </prebuilders>
<postbuilders> <postbuilders>
<hudson.tasks.BatchFile> <hudson.tasks.Shell>
<command>net stop CRM&#xd; <command>sudo systemctl stop CRM
FOR /F &quot;tokens=5 delims= &quot; %%P IN (&apos;netstat -a -n -o ^| findstr :50201 ^| findstr LISTEN&apos;) DO TaskKill.exe /F /PID %%P&#xd;
del E:\CHM\CRM\lib\*.* /q&#xd;
&quot;C:\Program Files\7-Zip\7z.exe&quot; e target\CRM-pack.zip -oE:\CHM\CRM\lib CRM\lib\*.* -r&#xd; chm=/opt/CRM/
xcopy /Y /S src\main\resources\templates\* E:\CHM\CRM\templates&#xd; tempdir=$(mktemp -d)
net start CRM</command>
</hudson.tasks.BatchFile> sudo rm -f ${chm}/lib/*
sudo rm -rf ${chm}/templates/*
7za x target/CRM-pack.zip -o&quot;${tempdir}&quot;
sudo mv -f ${tempdir}/CRM/lib/* &quot;${chm}/lib&quot;
sudo mv -f ${tempdir}/CRM/templates/* &quot;${chm}/templates&quot;
rm -rf &quot;${tempdir}&quot;
sudo systemctl start CRM</command>
</hudson.tasks.Shell>
</postbuilders> </postbuilders>
<runPostStepsIfResult> <runPostStepsIfResult>
<name>UNSTABLE</name> <name>UNSTABLE</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