Commit 67e29957 authored by YM-RD-AP01\ymadmin's avatar YM-RD-AP01\ymadmin

20140144: Job [Deploy_CRM_API_Prod] configuration updated

Change performed by ·¨¼y°ó
parent 352b96f5
......@@ -15,15 +15,15 @@
master
release/1.15GA
hotfix/1.15.1GA</description>
<defaultValue>release/1.40GA</defaultValue>
<defaultValue>master</defaultValue>
<trim>false</trim>
</hudson.plugins.global__variable__string__parameter.GlobalVariableStringParameterDefinition>
</parameterDefinitions>
</hudson.model.ParametersDefinitionProperty>
<jenkins.model.BuildDiscarderProperty>
<strategy class="hudson.tasks.LogRotator">
<daysToKeep>1</daysToKeep>
<numToKeep>2</numToKeep>
<daysToKeep>-1</daysToKeep>
<numToKeep>5</numToKeep>
<artifactDaysToKeep>-1</artifactDaysToKeep>
<artifactNumToKeep>-1</artifactNumToKeep>
</strategy>
......@@ -51,11 +51,7 @@ hotfix/1.15.1GA</description>
<disabled>false</disabled>
<blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
<blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
<triggers>
<hudson.triggers.TimerTrigger>
<spec>0 7,13,17 * * *</spec>
</hudson.triggers.TimerTrigger>
</triggers>
<triggers/>
<concurrentBuild>false</concurrentBuild>
<rootModule>
<groupId>org.ylhealth.ym.chmapi</groupId>
......@@ -65,7 +61,7 @@ hotfix/1.15.1GA</description>
<defaultGoals>spring-boot:run</defaultGoals>
<aggregatorStyleBuild>true</aggregatorStyleBuild>
<incrementalBuild>false</incrementalBuild>
<ignoreUpstremChanges>false</ignoreUpstremChanges>
<ignoreUpstremChanges>true</ignoreUpstremChanges>
<ignoreUnsuccessfulUpstreams>false</ignoreUnsuccessfulUpstreams>
<archivingDisabled>true</archivingDisabled>
<siteArchivingDisabled>false</siteArchivingDisabled>
......@@ -80,7 +76,7 @@ hotfix/1.15.1GA</description>
<globalSettings class="jenkins.mvn.DefaultGlobalSettingsProvider"/>
<reporters>
<hudson.maven.reporters.MavenMailer>
<recipients>$RD_Group</recipients>
<recipients>$RD_Group $QA_Group</recipients>
<dontNotifyEveryUnstableBuild>false</dontNotifyEveryUnstableBuild>
<sendToIndividuals>false</sendToIndividuals>
<perModuleEmail>true</perModuleEmail>
......@@ -123,20 +119,29 @@ hotfix/1.15.1GA</description>
<hudson.plugins.timestamper.TimestamperBuildWrapper plugin="timestamper@1.8.10"/>
</buildWrappers>
<prebuilders>
<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
</command>
</hudson.tasks.Shell>
<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%</command>
</hudson.tasks.BatchFile>
</prebuilders>
<postbuilders>
<hudson.tasks.Shell>
<command>systemctl stop CRM_API
rm -f /opt/chm/chmapi/lib/*.jar
/usr/bin/unzip -j -o target/chmapi-pack.zip &quot;chmapi/lib/*&quot; -d /opt/chm/chmapi/lib
systemctl start CRM_API</command>
</hudson.tasks.Shell>
<hudson.tasks.BatchFile>
<command>ssh -i F:/jenkins/id_rsa ymadmin@10.36.220.122 &quot;rm -f /opt/chm/chmapi-pack.zip&quot;&#xd;
scp -i F:/jenkins/id_rsa target/chmapi-pack.zip ymadmin@10.36.220.122:/opt/chm/</command>
</hudson.tasks.BatchFile>
</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