config.xml 5.58 KB
Newer Older
1 2 3
<?xml version='1.1' encoding='UTF-8'?>
<maven2-moduleset plugin="maven-plugin@3.2">
  <actions/>
4
  <description>打包完會將 war 檔放到 3.16.159.120 :/home/ymadmin 下</description>
5 6 7 8 9 10 11 12 13 14 15 16 17
  <keepDependencies>false</keepDependencies>
  <properties>
    <com.dabsquared.gitlabjenkins.connection.GitLabConnectionProperty plugin="gitlab-plugin@1.5.11">
      <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>
18
          <defaultValue>feature/I18N</defaultValue>
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
          <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>5</numToKeep>
        <artifactDaysToKeep>-1</artifactDaysToKeep>
        <artifactNumToKeep>-1</artifactNumToKeep>
      </strategy>
    </jenkins.model.BuildDiscarderProperty>
  </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/form.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>
49
  <assignedNode>HCC_Proxy</assignedNode>
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
  <canRoam>false</canRoam>
  <disabled>false</disabled>
  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
  <triggers/>
  <concurrentBuild>false</concurrentBuild>
  <rootModule>
    <groupId>com.ylhealth.survey</groupId>
    <artifactId>designer_web</artifactId>
  </rootModule>
  <goals>clean package -Dmaven.test.skip=true -P !jenkins,prod</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>
    <jenkins.plugins.slack.SlackNotifier plugin="slack@2.9">
      <baseUrl></baseUrl>
      <teamDomain></teamDomain>
      <tokenCredentialId></tokenCredentialId>
      <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>
96
      <includeCustomMessage>true</includeCustomMessage>
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112
      <customMessage></customMessage>
    </jenkins.plugins.slack.SlackNotifier>
  </publishers>
  <buildWrappers>
    <hudson.plugins.ws__cleanup.PreBuildCleanup plugin="ws-cleanup@0.37">
      <deleteDirs>false</deleteDirs>
      <cleanupParameter></cleanupParameter>
      <externalDelete></externalDelete>
      <disableDeferredWipeout>false</disableDeferredWipeout>
    </hudson.plugins.ws__cleanup.PreBuildCleanup>
    <hudson.plugins.ansicolor.AnsiColorBuildWrapper plugin="ansicolor@0.6.0">
      <colorMapName>xterm</colorMapName>
    </hudson.plugins.ansicolor.AnsiColorBuildWrapper>
    <hudson.plugins.timestamper.TimestamperBuildWrapper plugin="timestamper@1.8.10"/>
  </buildWrappers>
  <prebuilders>
113 114 115
    <hudson.tasks.Shell>
      <command>VAR=$(git rev-parse --short HEAD)_$(date +&quot;%Y%m%d_%H%M&quot;)
version=${GIT_BRANCH##*/}
116
sed -i &quot;s/&lt;title.*/&lt;title&gt;Form v${version}_${VAR}&lt;\/title\/&gt;/&quot; src/main/webapp/WEB-INF/jsp/home.jsp</command>
117
    </hudson.tasks.Shell>
118 119
  </prebuilders>
  <postbuilders>
120
    <hudson.tasks.Shell>
121 122
      <command>ssh -i /root/.ssh/id_rsa ec2-user@3.16.159.120 &quot;rm -f designer.war&quot;
scp -i /root/.ssh/id_rsa target/designer.war ec2-user@3.16.159.120:~/</command>
123
    </hudson.tasks.Shell>
124 125 126 127 128 129 130 131
  </postbuilders>
  <runPostStepsIfResult>
    <name>SUCCESS</name>
    <ordinal>0</ordinal>
    <color>BLUE</color>
    <completeBuild>true</completeBuild>
  </runPostStepsIfResult>
</maven2-moduleset>