Commit 85eda9a9 authored by YM-RD-AP01\ymadmin's avatar YM-RD-AP01\ymadmin

20140144: Job [Deploy_CHM_UAT_136] configuration updated

Change performed by ·¨¼y°ó
parent 09dd8c48
......@@ -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,26 +106,12 @@ 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;
echo Version:%VAR%&#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 %version%_%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;base.*/&lt;base href=\&quot;\/CRM\/\&quot; version=\&quot;%version%_%VAR%\&quot;\/&gt;/&quot; src\main\resources\static\indexMinify.html&#xd;
</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 ng-bind=&apos;page_title&apos;&gt;CRM v${version}_${VAR}&lt;\/title\/&gt;/&quot; src/main/resources/static/index.html
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>
</hudson.tasks.Shell>
</prebuilders>
<postbuilders>
<hudson.tasks.BatchFile>
......@@ -136,6 +122,13 @@ del C:\CHM\CRM\lib\*.* /q&#xd;
xcopy /Y /S src\main\resources\templates\* C:\CHM\CRM\templates&#xd;
net start CRM</command>
</hudson.tasks.BatchFile>
<hudson.tasks.Shell>
<command>sudo systemctl stop CRM
rm -f /opt/chm/chm/lib/*
7za e target/CRM-pack.zip -o/opt/chm/chm/lib/ CRM\lib\*.* -r
7za e target/CRM-pack.zip -o/opt/chm/chm/templates/ CRM\templates\*.* -r
sudo systemctl start CRM</command>
</hudson.tasks.Shell>
</postbuilders>
<runPostStepsIfResult>
<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