config.xml 8.75 KB
Newer Older
1
<?xml version='1.1' encoding='UTF-8'?>
2
<maven2-moduleset plugin="maven-plugin@3.2">
3
  <actions/>
4 5 6 7
  <description>打包完會放到 &#xd;
10.36.220.122:/opt/chm/&#xd;
再到該台主機上執行&#xd;
/opt/chm/updateCRM.sh</description>
8 9
  <keepDependencies>false</keepDependencies>
  <properties>
10
    <hudson.security.AuthorizationMatrixProperty>
11
      <inheritanceStrategy class="org.jenkinsci.plugins.matrixauth.inheritance.NonInheritingStrategy"/>
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
      <permission>com.cloudbees.plugins.credentials.CredentialsProvider.Create:HH-Admin</permission>
      <permission>com.cloudbees.plugins.credentials.CredentialsProvider.Delete:HH-Admin</permission>
      <permission>com.cloudbees.plugins.credentials.CredentialsProvider.ManageDomains:HH-Admin</permission>
      <permission>com.cloudbees.plugins.credentials.CredentialsProvider.Update:HH-Admin</permission>
      <permission>com.cloudbees.plugins.credentials.CredentialsProvider.View:HH-Admin</permission>
      <permission>hudson.model.Item.Build:HH-Admin</permission>
      <permission>hudson.model.Item.Cancel:HH-Admin</permission>
      <permission>hudson.model.Item.Configure:HH-Admin</permission>
      <permission>hudson.model.Item.Delete:HH-Admin</permission>
      <permission>hudson.model.Item.Discover:HH-Admin</permission>
      <permission>hudson.model.Item.Move:HH-Admin</permission>
      <permission>hudson.model.Item.Read:HH-Admin</permission>
      <permission>hudson.model.Item.Workspace:HH-Admin</permission>
      <permission>hudson.model.Run.Delete:HH-Admin</permission>
      <permission>hudson.model.Run.Replay:HH-Admin</permission>
      <permission>hudson.model.Run.Update:HH-Admin</permission>
      <permission>hudson.scm.SCM.Tag:HH-Admin</permission>
29 30
    </hudson.security.AuthorizationMatrixProperty>
    <com.dabsquared.gitlabjenkins.connection.GitLabConnectionProperty plugin="gitlab-plugin@1.5.12">
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
      <gitLabConnection>ylhealth</gitLabConnection>
    </com.dabsquared.gitlabjenkins.connection.GitLabConnectionProperty>
    <hudson.model.ParametersDefinitionProperty>
      <parameterDefinitions>
        <hudson.plugins.global__variable__string__parameter.GlobalVariableStringParameterDefinition plugin="global-variable-string-parameter@1.2">
          <name>GIT_BRANCH</name>
          <description>
master
release/1.15GA
hotfix/1.15.1GA</description>
          <defaultValue>master</defaultValue>
          <trim>false</trim>
        </hudson.plugins.global__variable__string__parameter.GlobalVariableStringParameterDefinition>
      </parameterDefinitions>
    </hudson.model.ParametersDefinitionProperty>
46 47
    <jenkins.model.BuildDiscarderProperty>
      <strategy class="hudson.tasks.LogRotator">
48
        <daysToKeep>-1</daysToKeep>
49 50 51 52 53
        <numToKeep>5</numToKeep>
        <artifactDaysToKeep>-1</artifactDaysToKeep>
        <artifactNumToKeep>-1</artifactNumToKeep>
      </strategy>
    </jenkins.model.BuildDiscarderProperty>
54
  </properties>
55
  <scm class="hudson.plugins.git.GitSCM" plugin="git@3.10.0">
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108
    <configVersion>2</configVersion>
    <userRemoteConfigs>
      <hudson.plugins.git.UserRemoteConfig>
        <url>https://cm.ylhealth.org/gitlab/ym/CRM.git</url>
        <credentialsId>3485e854-8389-40e8-8c86-b94e94e91904</credentialsId>
      </hudson.plugins.git.UserRemoteConfig>
    </userRemoteConfigs>
    <branches>
      <hudson.plugins.git.BranchSpec>
        <name>*/${GIT_BRANCH}</name>
      </hudson.plugins.git.BranchSpec>
    </branches>
    <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
    <submoduleCfg class="list"/>
    <extensions/>
  </scm>
  <assignedNode>Build_Prod_127</assignedNode>
  <canRoam>false</canRoam>
  <disabled>false</disabled>
  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
  <triggers/>
  <concurrentBuild>false</concurrentBuild>
  <rootModule>
    <groupId>org.ylhealth.ym</groupId>
    <artifactId>CRM</artifactId>
  </rootModule>
  <goals>clean process-resources package -Dmaven.test.skip=true</goals>
  <defaultGoals>spring-boot:run</defaultGoals>
  <aggregatorStyleBuild>true</aggregatorStyleBuild>
  <incrementalBuild>false</incrementalBuild>
  <ignoreUpstremChanges>true</ignoreUpstremChanges>
  <ignoreUnsuccessfulUpstreams>false</ignoreUnsuccessfulUpstreams>
  <archivingDisabled>true</archivingDisabled>
  <siteArchivingDisabled>false</siteArchivingDisabled>
  <fingerprintingDisabled>false</fingerprintingDisabled>
  <resolveDependencies>false</resolveDependencies>
  <processPlugins>false</processPlugins>
  <mavenValidationLevel>-1</mavenValidationLevel>
  <runHeadless>false</runHeadless>
  <disableTriggerDownstreamProjects>false</disableTriggerDownstreamProjects>
  <blockTriggerWhenBuilding>true</blockTriggerWhenBuilding>
  <settings class="jenkins.mvn.DefaultSettingsProvider"/>
  <globalSettings class="jenkins.mvn.DefaultGlobalSettingsProvider"/>
  <reporters>
    <hudson.maven.reporters.MavenMailer>
      <recipients>$RD_Group $QA_Group</recipients>
      <dontNotifyEveryUnstableBuild>false</dontNotifyEveryUnstableBuild>
      <sendToIndividuals>false</sendToIndividuals>
      <perModuleEmail>true</perModuleEmail>
    </hudson.maven.reporters.MavenMailer>
  </reporters>
  <publishers>
109
    <jenkins.plugins.slack.SlackNotifier plugin="slack@2.23">
110 111 112
      <baseUrl></baseUrl>
      <teamDomain></teamDomain>
      <authToken></authToken>
113
      <tokenCredentialId></tokenCredentialId>
114 115 116 117 118 119 120 121 122
      <botUser>false</botUser>
      <room></room>
      <startNotification>false</startNotification>
      <notifySuccess>false</notifySuccess>
      <notifyAborted>true</notifyAborted>
      <notifyNotBuilt>true</notifyNotBuilt>
      <notifyUnstable>true</notifyUnstable>
      <notifyRegression>false</notifyRegression>
      <notifyFailure>true</notifyFailure>
123
      <notifyEveryFailure>false</notifyEveryFailure>
124 125 126 127 128 129 130
      <notifyBackToNormal>true</notifyBackToNormal>
      <notifyRepeatedFailure>false</notifyRepeatedFailure>
      <includeTestSummary>false</includeTestSummary>
      <includeFailedTests>false</includeFailedTests>
      <commitInfoChoice>NONE</commitInfoChoice>
      <includeCustomMessage>false</includeCustomMessage>
      <customMessage></customMessage>
131 132 133 134 135
      <customMessageSuccess></customMessageSuccess>
      <customMessageAborted></customMessageAborted>
      <customMessageNotBuilt></customMessageNotBuilt>
      <customMessageUnstable></customMessageUnstable>
      <customMessageFailure></customMessageFailure>
136 137 138
    </jenkins.plugins.slack.SlackNotifier>
  </publishers>
  <buildWrappers>
139
    <hudson.plugins.ws__cleanup.PreBuildCleanup plugin="ws-cleanup@0.37">
140 141 142
      <deleteDirs>false</deleteDirs>
      <cleanupParameter></cleanupParameter>
      <externalDelete></externalDelete>
143
      <disableDeferredWipeout>false</disableDeferredWipeout>
144
    </hudson.plugins.ws__cleanup.PreBuildCleanup>
145
    <hudson.plugins.ansicolor.AnsiColorBuildWrapper plugin="ansicolor@0.6.2">
146 147
      <colorMapName>xterm</colorMapName>
    </hudson.plugins.ansicolor.AnsiColorBuildWrapper>
148
    <hudson.plugins.timestamper.TimestamperBuildWrapper plugin="timestamper@1.9"/>
149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164
  </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;
165
for /f %%a in (&apos;git describe --tags&apos;) do set &quot;tags=%%a&quot;&#xd;
166 167
&#xd;
echo Version:%VAR%&#xd;
168 169
sed -i &quot;s/&lt;title.*/&lt;title ng-bind=&apos;page_title&apos;&gt;CRM %tags%_%version%_%VAR%&lt;\/title\/&gt;/&quot; src\main\resources\static\index.html&#xd;
sed -i &quot;s/&lt;base.*/&lt;base href=\&quot;\/CRM\/\&quot; version=\&quot;%tags%_%version%_%VAR%\&quot;\/&gt;/&quot; src\main\resources\static\indexMinify.html&#xd;
170 171 172 173
</command>
    </hudson.tasks.BatchFile>
  </prebuilders>
  <postbuilders>
174 175
    <hudson.tasks.BatchFile>
      <command>ssh -i F:/jenkins/id_rsa ymadmin@10.36.220.122 &quot;rm -f /opt/chm/CRM-pack.zip&quot;&#xd;
176
scp -i F:/jenkins/id_rsa target/CRM-pack.zip ymadmin@10.36.220.122:/opt/chm/</command>
177
    </hudson.tasks.BatchFile>
178 179 180 181 182 183 184 185
  </postbuilders>
  <runPostStepsIfResult>
    <name>UNSTABLE</name>
    <ordinal>1</ordinal>
    <color>YELLOW</color>
    <completeBuild>true</completeBuild>
  </runPostStepsIfResult>
</maven2-moduleset>