config.xml 4.63 KB
Newer Older
1 2 3 4 5 6
<?xml version='1.1' encoding='UTF-8'?>
<project>
  <actions/>
  <description>只打包 ipa,不做 code push</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>5</numToKeep>
        <artifactDaysToKeep>-1</artifactDaysToKeep>
        <artifactNumToKeep>-1</artifactNumToKeep>
      </strategy>
    </jenkins.model.BuildDiscarderProperty>
15
    <com.dabsquared.gitlabjenkins.connection.GitLabConnectionProperty plugin="gitlab-plugin@1.5.11">
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
      <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_Prod_Branch</name>
          <description>UAT 使用的版本,如:
release/1.15GA
hotfix/1.14.1GA</description>
          <defaultValue>master</defaultValue>
          <trim>false</trim>
        </hudson.plugins.global__variable__string__parameter.GlobalVariableStringParameterDefinition>
      </parameterDefinitions>
    </hudson.model.ParametersDefinitionProperty>
  </properties>
31
  <scm class="hudson.plugins.git.GitSCM" plugin="git@3.9.3">
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
    <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_Prod_Branch}</name>
      </hudson.plugins.git.BranchSpec>
    </branches>
    <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
    <submoduleCfg class="list"/>
    <extensions/>
  </scm>
48
  <assignedNode>Mac_Node1</assignedNode>
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
  <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
VERSION=$(grep appVersion appConfig.json|cut -d&apos;&quot;&apos; -f4)_$(git rev-parse --short HEAD)
MODIFIED_DATE=$(git log -1 --format=&quot;%ci&quot; --)

npm install
# RNFB_ANDROID_PERMISSIONS=true react-native link

sed -i &quot;&quot; &apos;/url/s/http.*\//https:\/\/hrb.foxconn.com\//g&apos; src/configs/index.js
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
sed -i &apos;&apos; &apos;s/piwikSiteId_ios =.*/piwikSiteId_ios = 10;/ ;s/piwikSiteId_android =.*/piwikSiteId_android = 11;/&apos; src/configs/index.js

70 71 72 73
# RN0.57.8 modify(HA-1058), after RN0.58 will remove this command
sed -i &quot;&quot; &apos;s/NSUInteger loopCount = 0;/CGFloat loopCount = 0;/&apos; node_modules/react-native/Libraries/Image/RCTGIFImageDecoder.m


74 75
# node node_modules/react-native/local-cli/cli.js bundle --dev false --assets-dest ./ios --entry-file index.thread.js --platform ios --bundle-output ./ios/index.thread.jsbundle --sourcemap-output ./ios/index.thread.map
npm run build-thread-ios
76

77
bundle exec fastlane ios release</command>
78 79 80
    </hudson.tasks.Shell>
  </builders>
  <publishers>
81
    <hudson.tasks.Mailer plugin="mailer@1.23">
82 83 84 85 86 87
      <recipients>$RD_Group $QA_Group</recipients>
      <dontNotifyEveryUnstableBuild>false</dontNotifyEveryUnstableBuild>
      <sendToIndividuals>false</sendToIndividuals>
    </hudson.tasks.Mailer>
  </publishers>
  <buildWrappers>
88
    <hudson.plugins.ws__cleanup.PreBuildCleanup plugin="ws-cleanup@0.37">
89 90 91
      <deleteDirs>false</deleteDirs>
      <cleanupParameter></cleanupParameter>
      <externalDelete></externalDelete>
92
      <disableDeferredWipeout>false</disableDeferredWipeout>
93
    </hudson.plugins.ws__cleanup.PreBuildCleanup>
94 95
    <hudson.plugins.timestamper.TimestamperBuildWrapper plugin="timestamper@1.9"/>
    <hudson.plugins.ansicolor.AnsiColorBuildWrapper plugin="ansicolor@0.6.2">
96 97 98 99
      <colorMapName>xterm</colorMapName>
    </hudson.plugins.ansicolor.AnsiColorBuildWrapper>
  </buildWrappers>
</project>