config.xml 4.9 KB
Newer Older
1
<?xml version="1.1" encoding="UTF-8" standalone="no"?><project>
2 3 4 5
  <actions/>
  <description>只打包 ipa,不做 code push</description>
  <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 17 18 19
    <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>
20 21 22 23 24 25
        <hudson.plugins.global__variable__string__parameter.GlobalVariableStringParameterDefinition plugin="global-variable-string-parameter@1.2">
          <name>CODE_PUSH</name>
          <description>哪一個 Job 執行 code-push</description>
          <defaultValue>hrb</defaultValue>
          <trim>false</trim>
        </hudson.plugins.global__variable__string__parameter.GlobalVariableStringParameterDefinition>
26 27
      </parameterDefinitions>
    </hudson.model.ParametersDefinitionProperty>
28 29 30 31 32 33 34 35
    <jenkins.model.BuildDiscarderProperty>
      <strategy class="hudson.tasks.LogRotator">
        <daysToKeep>-1</daysToKeep>
        <numToKeep>5</numToKeep>
        <artifactDaysToKeep>-1</artifactDaysToKeep>
        <artifactNumToKeep>-1</artifactNumToKeep>
      </strategy>
    </jenkins.model.BuildDiscarderProperty>
36
  </properties>
37
  <scm class="hudson.plugins.git.GitSCM" plugin="git@4.2.2">
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
    <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>
54
  <assignedNode>Mac_Node</assignedNode>
55 56 57 58 59 60 61 62
  <canRoam>false</canRoam>
  <disabled>false</disabled>
  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
  <triggers/>
  <concurrentBuild>false</concurrentBuild>
  <builders>
    <hudson.tasks.Shell>
63 64
      <command>sh jenkins_ios_prod.sh ${CODE_PUSH}

65 66 67 68
#PATH="$PATH:/usr/local/bin:/Users/jenkins/.fastlane/bin/"
#security set-key-partition-list -S apple: -k Yonglinit123 -D "iPhone Distribution: YONGLIN YONGLIN BIOTECH CORP." -t private
#VERSION=$(grep appVersion appConfig.json|cut -d'"' -f4)_$(git rev-parse --short HEAD)
#MODIFIED_DATE=$(git log -1 --format="%ci" --)
69 70 71

#npm install
## RNFB_ANDROID_PERMISSIONS=true react-native link
72

73 74 75 76
#sed -i "" '/url/s/http.*\//https:\/\/hrb.foxconn.com\//g' src/configs/index.js
#sed -i '' "/version/s/\'.*\';/\'${VERSION}\';/" src/configs/index.js
#sed -i '' "/modifiedTime/s/\'.*\';/\'${MODIFIED_DATE}\';/" src/configs/index.js
#sed -i '' 's/piwikSiteId_ios =.*/piwikSiteId_ios = 10;/ ;s/piwikSiteId_android =.*/piwikSiteId_android = 11;/' src/configs/index.js
77

78
## RN0.57.8 modify(HA-1058), after RN0.58 will remove this command
79
#sed -i "" 's/NSUInteger loopCount = 0;/CGFloat loopCount = 0;/' node_modules/react-native/Libraries/Image/RCTGIFImageDecoder.m
80

81

82 83
## 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
84

85
#bundle exec fastlane ios release</command>
86 87 88
    </hudson.tasks.Shell>
  </builders>
  <publishers>
89
    <hudson.tasks.Mailer plugin="mailer@1.30">
90 91 92 93 94 95
      <recipients>$RD_Group $QA_Group</recipients>
      <dontNotifyEveryUnstableBuild>false</dontNotifyEveryUnstableBuild>
      <sendToIndividuals>false</sendToIndividuals>
    </hudson.tasks.Mailer>
  </publishers>
  <buildWrappers>
96
    <hudson.plugins.ws__cleanup.PreBuildCleanup plugin="ws-cleanup@0.38">
97
      <deleteDirs>false</deleteDirs>
98 99
      <cleanupParameter/>
      <externalDelete/>
100
      <disableDeferredWipeout>false</disableDeferredWipeout>
101
    </hudson.plugins.ws__cleanup.PreBuildCleanup>
102
    <hudson.plugins.ansicolor.AnsiColorBuildWrapper plugin="ansicolor@0.6.3">
103 104
      <colorMapName>xterm</colorMapName>
    </hudson.plugins.ansicolor.AnsiColorBuildWrapper>
105
    <hudson.plugins.timestamper.TimestamperBuildWrapper plugin="timestamper@1.11.2"/>
106 107
  </buildWrappers>
</project>