config.xml 8.23 KB
Newer Older
1 2 3 4 5 6
<?xml version='1.1' encoding='UTF-8'?>
<maven2-moduleset plugin="maven-plugin@3.1.2">
  <actions/>
  <description></description>
  <keepDependencies>false</keepDependencies>
  <properties>
7 8 9 10 11 12 13 14
    <jenkins.model.BuildDiscarderProperty>
      <strategy class="hudson.tasks.LogRotator">
        <daysToKeep>1</daysToKeep>
        <numToKeep>3</numToKeep>
        <artifactDaysToKeep>-1</artifactDaysToKeep>
        <artifactNumToKeep>-1</artifactNumToKeep>
      </strategy>
    </jenkins.model.BuildDiscarderProperty>
15
    <com.dabsquared.gitlabjenkins.connection.GitLabConnectionProperty plugin="gitlab-plugin@1.5.10">
16 17
      <gitLabConnection>ylhealth</gitLabConnection>
    </com.dabsquared.gitlabjenkins.connection.GitLabConnectionProperty>
18 19 20 21 22 23 24 25 26 27
    <hudson.model.ParametersDefinitionProperty>
      <parameterDefinitions>
        <hudson.model.StringParameterDefinition>
          <name>Build_Branch</name>
          <description></description>
          <defaultValue>develop</defaultValue>
          <trim>false</trim>
        </hudson.model.StringParameterDefinition>
      </parameterDefinitions>
    </hudson.model.ParametersDefinitionProperty>
28 29 30 31 32 33 34 35 36 37 38
  </properties>
  <scm class="hudson.plugins.git.GitSCM" plugin="git@3.9.1">
    <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>
39
        <name>*/develop</name>
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 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 109 110 111 112 113
      </hudson.plugins.git.BranchSpec>
    </branches>
    <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
    <submoduleCfg class="list"/>
    <extensions/>
  </scm>
  <assignedNode>SIT_132</assignedNode>
  <canRoam>false</canRoam>
  <disabled>false</disabled>
  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
  <triggers>
    <hudson.triggers.TimerTrigger>
      <spec>0 7,13,17 * * *</spec>
    </hudson.triggers.TimerTrigger>
    <hudson.triggers.SCMTrigger>
      <spec></spec>
      <ignorePostCommitHooks>false</ignorePostCommitHooks>
    </hudson.triggers.SCMTrigger>
  </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>
  <mavenOpts>-XX:ReservedCodeCacheSize=512m</mavenOpts>
  <aggregatorStyleBuild>true</aggregatorStyleBuild>
  <incrementalBuild>false</incrementalBuild>
  <ignoreUpstremChanges>false</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>
    <jenkins.plugins.slack.SlackNotifier plugin="slack@2.3">
      <baseUrl></baseUrl>
      <teamDomain></teamDomain>
      <authToken></authToken>
      <authTokenCredentialId></authTokenCredentialId>
      <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>
      <notifyBackToNormal>true</notifyBackToNormal>
      <notifyRepeatedFailure>false</notifyRepeatedFailure>
      <includeTestSummary>false</includeTestSummary>
      <includeFailedTests>false</includeFailedTests>
      <commitInfoChoice>NONE</commitInfoChoice>
      <includeCustomMessage>false</includeCustomMessage>
      <customMessage></customMessage>
    </jenkins.plugins.slack.SlackNotifier>
114 115 116 117 118 119 120 121 122 123 124 125 126 127
    <hudson.plugins.parameterizedtrigger.BuildTrigger plugin="parameterized-trigger@2.35.2">
      <configs>
        <hudson.plugins.parameterizedtrigger.BuildTriggerConfig>
          <configs>
            <hudson.plugins.parameterizedtrigger.PredefinedBuildParameters>
              <properties>Branch_Variable=$Build_Branch</properties>
              <textParamValueOnNewLine>false</textParamValueOnNewLine>
            </hudson.plugins.parameterizedtrigger.PredefinedBuildParameters>
          </configs>
          <projects>CHM_Analysis</projects>
          <condition>SUCCESS</condition>
          <triggerWithNoParameters>false</triggerWithNoParameters>
          <triggerFromChildProjects>false</triggerFromChildProjects>
        </hudson.plugins.parameterizedtrigger.BuildTriggerConfig>
128 129 130 131 132 133 134 135 136 137 138 139
        <hudson.plugins.parameterizedtrigger.BuildTriggerConfig>
          <configs>
            <hudson.plugins.parameterizedtrigger.PredefinedBuildParameters>
              <properties>NotifyMessage=Deploy HRA on SIT(132) done.</properties>
              <textParamValueOnNewLine>false</textParamValueOnNewLine>
            </hudson.plugins.parameterizedtrigger.PredefinedBuildParameters>
          </configs>
          <projects>Notify_Group</projects>
          <condition>SUCCESS</condition>
          <triggerWithNoParameters>false</triggerWithNoParameters>
          <triggerFromChildProjects>false</triggerFromChildProjects>
        </hudson.plugins.parameterizedtrigger.BuildTriggerConfig>
140 141
      </configs>
    </hudson.plugins.parameterizedtrigger.BuildTrigger>
142 143
  </publishers>
  <buildWrappers>
144
    <hudson.plugins.timestamper.TimestamperBuildWrapper plugin="timestamper@1.8.10"/>
145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181
    <hudson.plugins.ansicolor.AnsiColorBuildWrapper plugin="ansicolor@0.5.2">
      <colorMapName>xterm</colorMapName>
    </hudson.plugins.ansicolor.AnsiColorBuildWrapper>
  </buildWrappers>
  <prebuilders>
    <hudson.tasks.BatchFile>
      <command>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;
&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>
  <postbuilders>
    <hudson.tasks.BatchFile>
      <command>net stop CRM&#xd;
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 C:\Deploy\CRM\lib\*.* /q&#xd;
&quot;C:\Program Files\7-Zip\7z.exe&quot; e target\CRM-pack.zip -oC:\Deploy\CRM\lib CRM\lib\*.* -r&#xd;
xcopy /Y /S src\main\resources\templates\* C:\Deploy\CRM\templates&#xd;
net start CRM</command>
    </hudson.tasks.BatchFile>
  </postbuilders>
  <runPostStepsIfResult>
    <name>SUCCESS</name>
    <ordinal>0</ordinal>
    <color>BLUE</color>
    <completeBuild>true</completeBuild>
  </runPostStepsIfResult>
</maven2-moduleset>