config.xml 5.39 KB
Newer Older
1 2 3
<?xml version='1.1' encoding='UTF-8'?>
<project>
  <actions/>
4
  <description>DHP 打包 ipa,不做 code push</description>
5 6 7 8 9 10 11 12 13 14 15 16
  <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>HRB_Mobile_UAT_Branch</name>
          <description>UAT 使用的版本,如:
release/1.15GA
hotfix/1.14.1GA</description>
17
          <defaultValue>DHP</defaultValue>
18 19 20 21 22 23
          <trim>false</trim>
        </hudson.plugins.global__variable__string__parameter.GlobalVariableStringParameterDefinition>
      </parameterDefinitions>
    </hudson.model.ParametersDefinitionProperty>
    <jenkins.model.BuildDiscarderProperty>
      <strategy class="hudson.tasks.LogRotator">
24
        <daysToKeep>-1</daysToKeep>
25 26 27 28 29 30 31 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
        <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/HRB_Mobile.git</url>
        <credentialsId>3485e854-8389-40e8-8c86-b94e94e91904</credentialsId>
      </hudson.plugins.git.UserRemoteConfig>
    </userRemoteConfigs>
    <branches>
      <hudson.plugins.git.BranchSpec>
        <name>*/${HRB_Mobile_UAT_Branch}</name>
      </hudson.plugins.git.BranchSpec>
    </branches>
    <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
    <submoduleCfg class="list"/>
    <extensions/>
  </scm>
  <assignedNode>MAC_BUILD_Machine</assignedNode>
  <canRoam>false</canRoam>
  <disabled>false</disabled>
  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
  <triggers/>
  <concurrentBuild>false</concurrentBuild>
  <builders>
    <hudson.tasks.Shell>
      <command>PATH=&quot;$PATH:/usr/local/bin:/Users/jenkins/.fastlane/bin/&quot;
security set-key-partition-list -S apple: -k Yonglinit123 -D &quot;iPhone Distribution: YONGLIN YONGLIN BIOTECH CORP.&quot; -t private
59
VERSION=UAT_DHP_$(date +%Y%m%d)_$(git rev-parse --short HEAD)
60 61 62 63
MODIFIED_DATE=$(git log -1 --format=&quot;%ci&quot; --)

npm install

64
sed -i &quot;&quot; &apos;/url/s/http.*\//https:\/\/dihtest.uhealthbank.com\//g&apos; src/configs/index.js
65 66
sed -i &apos;&apos; &quot;/version/s/\&apos;.*\&apos;;/\&apos;${VERSION}\&apos;;/&quot; src/configs/index.js
sed -i &apos;&apos; &quot;/modifiedTime/s/\&apos;.*\&apos;;/\&apos;${MODIFIED_DATE}\&apos;;/&quot; src/configs/index.js
67
sed -i &apos;&apos; &quot;/defaultLanguageCode/s/\&apos;.*\&apos;;/\&apos;en_US\&apos;;/&quot; src/configs/index.js
68
sed -i &apos;&apos; &quot;/unitStandard/s/\&apos;.*\&apos;;/\&apos;USCU\&apos;;/&quot; src/configs/index.js
69

70
npm run build-thread-ios
71 72 73
bundle exec fastlane ios uat</command>
    </hudson.tasks.Shell>
    <hudson.tasks.Shell>
74
      <command>VERSION=UAT_DHP_$(date +%Y%m%d)_$(git rev-parse --short HEAD)
75 76 77 78
MODIFIED_DATE=$(git log -1 --format=&quot;%ci&quot; --)
NAME=HRB_Mobile

mv $NAME.ipa ~/Sites/${NAME}_${VERSION}.ipa
79
scp ~/Sites/${NAME}_${VERSION}.ipa appuploader@10.57.117.135:~/app/dhp/</command>
80 81 82 83 84 85 86 87
    </hudson.tasks.Shell>
  </builders>
  <publishers>
    <hudson.plugins.parameterizedtrigger.BuildTrigger plugin="parameterized-trigger@2.35.2">
      <configs>
        <hudson.plugins.parameterizedtrigger.BuildTriggerConfig>
          <configs>
            <hudson.plugins.parameterizedtrigger.PredefinedBuildParameters>
88
              <properties>NotifyMessage=Deploy HRB Mobile ipa on UAT DHP done.</properties>
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105
              <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>
      </configs>
    </hudson.plugins.parameterizedtrigger.BuildTrigger>
    <hudson.tasks.Mailer plugin="mailer@1.22">
      <recipients>$RD_Group $QA_Group</recipients>
      <dontNotifyEveryUnstableBuild>false</dontNotifyEveryUnstableBuild>
      <sendToIndividuals>true</sendToIndividuals>
    </hudson.tasks.Mailer>
  </publishers>
  <buildWrappers>
106
    <hudson.plugins.ws__cleanup.PreBuildCleanup plugin="ws-cleanup@0.37">
107 108 109 110 111
      <deleteDirs>false</deleteDirs>
      <cleanupParameter></cleanupParameter>
      <externalDelete></externalDelete>
      <disableDeferredWipeout>false</disableDeferredWipeout>
    </hudson.plugins.ws__cleanup.PreBuildCleanup>
112
    <hudson.plugins.ansicolor.AnsiColorBuildWrapper plugin="ansicolor@0.6.0">
113 114 115 116 117
      <colorMapName>xterm</colorMapName>
    </hudson.plugins.ansicolor.AnsiColorBuildWrapper>
    <hudson.plugins.timestamper.TimestamperBuildWrapper plugin="timestamper@1.8.10"/>
  </buildWrappers>
</project>