config.xml 5.43 KB
Newer Older
1
<?xml version="1.1" encoding="UTF-8" standalone="no"?><maven2-moduleset plugin="maven-plugin@3.5">
2
  <actions/>
3
  <description/>
4 5
  <keepDependencies>false</keepDependencies>
  <properties>
6
    <com.dabsquared.gitlabjenkins.connection.GitLabConnectionProperty plugin="gitlab-plugin@1.5.13">
7 8
      <gitLabConnection>ylhealth</gitLabConnection>
    </com.dabsquared.gitlabjenkins.connection.GitLabConnectionProperty>
9
    
10 11 12 13 14 15 16
    <hudson.model.ParametersDefinitionProperty>
      <parameterDefinitions>
        <hudson.plugins.global__variable__string__parameter.GlobalVariableStringParameterDefinition plugin="global-variable-string-parameter@1.2">
          <name>GIT_BRANCH</name>
          <description>
release/1.15GA
hotfix/1.15.1GA</description>
17
          <defaultValue>release/1.73GA</defaultValue>
18 19 20 21
          <trim>false</trim>
        </hudson.plugins.global__variable__string__parameter.GlobalVariableStringParameterDefinition>
      </parameterDefinitions>
    </hudson.model.ParametersDefinitionProperty>
22 23 24 25 26 27 28 29
    <jenkins.model.BuildDiscarderProperty>
      <strategy class="hudson.tasks.LogRotator">
        <daysToKeep>1</daysToKeep>
        <numToKeep>3</numToKeep>
        <artifactDaysToKeep>-1</artifactDaysToKeep>
        <artifactNumToKeep>-1</artifactNumToKeep>
      </strategy>
    </jenkins.model.BuildDiscarderProperty>
30
  </properties>
31
  <scm class="hudson.plugins.git.GitSCM" plugin="git@4.2.2">
32 33 34 35 36 37 38 39 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
    <configVersion>2</configVersion>
    <userRemoteConfigs>
      <hudson.plugins.git.UserRemoteConfig>
        <url>https://cm.ylhealth.org/gitlab/ym/HRB-Rule-Engine.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>UAT_137</assignedNode>
  <canRoam>false</canRoam>
  <disabled>false</disabled>
  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
  <triggers/>
  <concurrentBuild>false</concurrentBuild>
  <rootModule>
    <groupId>com.ylhealth.hra</groupId>
    <artifactId>ylhealth_hra</artifactId>
  </rootModule>
  <goals>clean package -Dmaven.test.skip=true -P !jenkins,uat</goals>
  <defaultGoals>jetty:run</defaultGoals>
  <aggregatorStyleBuild>true</aggregatorStyleBuild>
  <incrementalBuild>false</incrementalBuild>
  <ignoreUpstremChanges>false</ignoreUpstremChanges>
  <ignoreUnsuccessfulUpstreams>false</ignoreUnsuccessfulUpstreams>
  <archivingDisabled>true</archivingDisabled>
  <siteArchivingDisabled>true</siteArchivingDisabled>
  <fingerprintingDisabled>true</fingerprintingDisabled>
  <resolveDependencies>false</resolveDependencies>
  <processPlugins>false</processPlugins>
  <mavenValidationLevel>-1</mavenValidationLevel>
  <runHeadless>false</runHeadless>
  <disableTriggerDownstreamProjects>true</disableTriggerDownstreamProjects>
  <settings class="jenkins.mvn.DefaultSettingsProvider"/>
  <globalSettings class="jenkins.mvn.DefaultGlobalSettingsProvider"/>
  <reporters/>
  <publishers>
77 78 79 80 81
    <jenkins.plugins.slack.SlackNotifier plugin="slack@2.37">
      <baseUrl/>
      <teamDomain/>
      <authToken/>
      <tokenCredentialId/>
82
      <botUser>false</botUser>
83
      <room/>
84
      <sendAsText>false</sendAsText>
85 86
      <iconEmoji/>
      <username/>
87 88 89 90 91 92 93
      <startNotification>false</startNotification>
      <notifySuccess>false</notifySuccess>
      <notifyAborted>true</notifyAborted>
      <notifyNotBuilt>true</notifyNotBuilt>
      <notifyUnstable>true</notifyUnstable>
      <notifyRegression>false</notifyRegression>
      <notifyFailure>true</notifyFailure>
94
      <notifyEveryFailure>false</notifyEveryFailure>
95 96 97 98 99 100
      <notifyBackToNormal>true</notifyBackToNormal>
      <notifyRepeatedFailure>false</notifyRepeatedFailure>
      <includeTestSummary>false</includeTestSummary>
      <includeFailedTests>false</includeFailedTests>
      <commitInfoChoice>NONE</commitInfoChoice>
      <includeCustomMessage>false</includeCustomMessage>
101 102 103 104 105 106
      <customMessage/>
      <customMessageSuccess/>
      <customMessageAborted/>
      <customMessageNotBuilt/>
      <customMessageUnstable/>
      <customMessageFailure/>
107 108 109
    </jenkins.plugins.slack.SlackNotifier>
  </publishers>
  <buildWrappers>
110
    <hudson.plugins.ws__cleanup.PreBuildCleanup plugin="ws-cleanup@0.38">
111
      <deleteDirs>false</deleteDirs>
112 113
      <cleanupParameter/>
      <externalDelete/>
114
      <disableDeferredWipeout>false</disableDeferredWipeout>
115 116 117 118
    </hudson.plugins.ws__cleanup.PreBuildCleanup>
  </buildWrappers>
  <prebuilders>
    <hudson.tasks.Shell>
119 120 121
      <command>VAR=$(git rev-parse --short HEAD)_$(date +"%Y%m%d_%H%M")
version=$(echo $GIT_BRANCH | cut -d'/' -f 3)
sed -i "s/&lt;base.*/&lt;base href=\"\/\" version=\"${version}_${VAR}\"\/&gt;/" WebContent/WEB-INF/jsp/home/home.jsp</command>
122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137
    </hudson.tasks.Shell>
  </prebuilders>
  <postbuilders>
    <hudson.tasks.Shell>
      <command>systemctl stop tomcat.service
cp target/ylhealth-hra.war /opt/tomcat/webapps/
systemctl start tomcat.service</command>
    </hudson.tasks.Shell>
  </postbuilders>
  <runPostStepsIfResult>
    <name>SUCCESS</name>
    <ordinal>0</ordinal>
    <color>BLUE</color>
    <completeBuild>true</completeBuild>
  </runPostStepsIfResult>
</maven2-moduleset>