From 06789a862b195f723bfd911f4188f2c43682a784 Mon Sep 17 00:00:00 2001 From: Stepan Lusnikov Date: Wed, 23 May 2018 14:44:51 +0800 Subject: [PATCH] Use android debug build for PR branches Signed-off-by: Pedro Pombeiro --- Jenkinsfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 56954cf955..bf0a5afb78 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -55,12 +55,13 @@ timeout(90) { // Android stage('Build (Android)') { - sh 'cd android && ./gradlew assembleRelease' + sh 'node --expose-gc --max_old_space_size=4096 ./node_modules/react-native/local-cli/cli.js bundle --platform android --dev false --entry-file index.android.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/debug/res' + sh 'cd android && ./gradlew assembleDebug' } stage('Deploy (Android)') { withCredentials([string(credentialsId: 'diawi-token', variable: 'token'), string(credentialsId: 'GIT_HUB_TOKEN', variable: 'githubToken')] ) { - def job = sh(returnStdout: true, script: 'curl https://upload.diawi.com/ -F token='+token+' -F file=@android/app/build/outputs/apk/release/app-release.apk -F find_by_udid=0 -F wall_of_apps=0 | jq -r ".job"').trim() + def job = sh(returnStdout: true, script: 'curl https://upload.diawi.com/ -F token='+token+' -F file=@android/app/build/outputs/apk/debug/app-debug.apk -F find_by_udid=0 -F wall_of_apps=0 | jq -r ".job"').trim() sh 'sleep 10' def hash = sh(returnStdout: true, script: "curl -vvv 'https://upload.diawi.com/status?token="+token+"&job="+job+"'|jq -r '.hash'").trim() apkUrl = 'https://i.diawi.com/' + hash