Commit c1855362 authored by YM-RD-AP01\ymadmin's avatar YM-RD-AP01\ymadmin

20170121: Job [HRB_Mobile_Prod_DHP_apk] configuration updated

Change performed by §N¨ήS
parent da0653b7
...@@ -17,6 +17,12 @@ hotfix/1.14.1GA</description> ...@@ -17,6 +17,12 @@ hotfix/1.14.1GA</description>
<defaultValue>DHP/master</defaultValue> <defaultValue>DHP/master</defaultValue>
<trim>false</trim> <trim>false</trim>
</hudson.plugins.global__variable__string__parameter.GlobalVariableStringParameterDefinition> </hudson.plugins.global__variable__string__parameter.GlobalVariableStringParameterDefinition>
<hudson.plugins.global__variable__string__parameter.GlobalVariableStringParameterDefinition plugin="global-variable-string-parameter@1.2">
<name>CODE_PUSH</name>
<description>哪一個 Job 執行 code-push</description>
<defaultValue>dhp</defaultValue>
<trim>false</trim>
</hudson.plugins.global__variable__string__parameter.GlobalVariableStringParameterDefinition>
</parameterDefinitions> </parameterDefinitions>
</hudson.model.ParametersDefinitionProperty> </hudson.model.ParametersDefinitionProperty>
<jenkins.model.BuildDiscarderProperty> <jenkins.model.BuildDiscarderProperty>
...@@ -54,33 +60,34 @@ hotfix/1.14.1GA</description> ...@@ -54,33 +60,34 @@ hotfix/1.14.1GA</description>
<concurrentBuild>false</concurrentBuild> <concurrentBuild>false</concurrentBuild>
<builders> <builders>
<hudson.tasks.Shell> <hudson.tasks.Shell>
<command>PATH=&quot;$PATH:/usr/local/bin:/Users/scott/.fastlane/bin/&quot; <command>sh jenkins_android_prod.sh ${CODE_PUSH}
export VERSION=$(grep appVersion appConfig.json|cut -d&apos;&quot;&apos; -f4)_$(git rev-list HEAD --count)_$(git rev-parse --short HEAD)
MODIFIED_DATE=$(git log -1 --format=&quot;%ci&quot; --) #PATH=&quot;$PATH:/usr/local/bin:/Users/scott/.fastlane/bin/&quot;
#export VERSION=$(grep appVersion appConfig.json|cut -d&apos;&quot;&apos; -f4)_$(git rev-list HEAD --count)_$(git rev-parse --short HEAD)
#MODIFIED_DATE=$(git log -1 --format=&quot;%ci&quot; --)
npm install #npm install
# RNFB_ANDROID_PERMISSIONS=true react-native link # RNFB_ANDROID_PERMISSIONS=true react-native link
sed -i &quot;&quot; &apos;/url/s/http.*\//https:\/\/dhp.h2uclub.com\//g&apos; src/configs/index.js #sed -i &quot;&quot; &apos;/url/s/http.*\//https:\/\/dhp.h2uclub.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;/version/s/\&apos;.*\&apos;;/\&apos;${VERSION}\&apos;;/&quot; src/configs/index.js
sed -i &apos;&apos; &quot;/defaultLanguageCode/s/\&apos;.*\&apos;;/\&apos;en_US\&apos;;/&quot; src/configs/index.js #sed -i &apos;&apos; &quot;/defaultLanguageCode/s/\&apos;.*\&apos;;/\&apos;en_US\&apos;;/&quot; src/configs/index.js
sed -i &apos;&apos; &quot;/unitStandard/s/\&apos;.*\&apos;;/\&apos;USCU\&apos;;/&quot; src/configs/index.js #sed -i &apos;&apos; &quot;/unitStandard/s/\&apos;.*\&apos;;/\&apos;USCU\&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; &quot;/modifiedTime/s/\&apos;.*\&apos;;/\&apos;${MODIFIED_DATE}\&apos;;/&quot; src/configs/index.js
sed -i &apos;&apos; &apos;s/piwikSiteId_ios =.*/piwikSiteId_ios = 13;/ ;s/piwikSiteId_android =.*/piwikSiteId_android = 12;/&apos; src/configs/index.js #sed -i &apos;&apos; &apos;s/piwikSiteId_ios =.*/piwikSiteId_ios = 13;/ ;s/piwikSiteId_android =.*/piwikSiteId_android = 12;/&apos; src/configs/index.js
sed -i &apos;&apos; &quot;/allergyUrl/s/\__DEV__.*\&apos;;/\&apos;https:\/\/dhp.h2uclub.com\/\&apos;;/&quot; src/configs/index.js #sed -i &apos;&apos; &quot;/allergyUrl/s/\__DEV__.*\&apos;;/\&apos;https:\/\/dhp.h2uclub.com\/\&apos;;/&quot; src/configs/index.js
export ANDROID_HOME=/Users/jenkins/Library/Android/sdk #export ANDROID_HOME=/Users/jenkins/Library/Android/sdk
npm run build-thread-android #npm run build-thread-android
bundle exec fastlane android release</command> #bundle exec fastlane android release
</hudson.tasks.Shell>
<hudson.tasks.Shell> #VERSION=Prod_DIH_$(date +%Y%m%d)_$(git rev-parse --short HEAD)
<command>VERSION=Prod_DIH_$(date +%Y%m%d)_$(git rev-parse --short HEAD) #MODIFIED_DATE=$(git log -1 --format=&quot;%ci&quot; --)
MODIFIED_DATE=$(git log -1 --format=&quot;%ci&quot; --) #NAME=HRB_Mobile
NAME=HRB_Mobile
mv android/app/build/outputs/apk/release/app-release.apk ~/Sites/${NAME}_${VERSION}.apk #mv android/app/build/outputs/apk/release/app-release.apk ~/Sites/${NAME}_${VERSION}.apk
scp ~/Sites/${NAME}_${VERSION}.apk appuploader@10.57.117.135:~/app/dhp/</command> #scp ~/Sites/${NAME}_${VERSION}.apk appuploader@10.57.117.135:~/app/dhp/</command>
</hudson.tasks.Shell> </hudson.tasks.Shell>
</builders> </builders>
<publishers> <publishers>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment