From c4f6f25c7d7184479f893095cc11450170fca1eb Mon Sep 17 00:00:00 2001 From: Chris Williams Date: Fri, 3 May 2019 15:13:19 -0400 Subject: [PATCH] build(jenkins): don't fail if post-build adb commands fail --- Jenkinsfile | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 4afc8043c84..c6ccfe0b17c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -96,21 +96,20 @@ def unitTests(os, nodeVersion, npmVersion, testSuiteBranch) { archiveArtifacts 'mocha_*.crash' sh 'rm -f mocha_*.crash' } else { - // gather crash reports/tombstones for Android - sh 'adb -e pull /data/tombstones' + sh label: 'gather crash reports/tombstones for Android', returnStatus: true, script: 'adb -e pull /data/tombstones' archiveArtifacts 'tombstones/' sh 'rm -f tombstones/' // wipe tombstones and re-build dir with proper permissions/ownership on emulator - sh 'adb -e shell rm -rf /data/tombstones' - sh 'adb -e shell mkdir -m 771 /data/tombstones' - sh 'adb -e shell chown system:system /data/tombstones' + sh returnStatus: true, script: 'adb -e shell rm -rf /data/tombstones' + sh returnStatus: true, script: 'adb -e shell mkdir -m 771 /data/tombstones' + sh returnStatus: true, script: 'adb -e shell chown system:system /data/tombstones' } throw e } finally { // Kill the emulators! if ('android'.equals(os)) { - sh 'adb -e shell am force-stop com.appcelerator.testApp.testing' - sh 'adb -e uninstall com.appcelerator.testApp.testing' + sh returnStatus: true, script: 'adb -e shell am force-stop com.appcelerator.testApp.testing' + sh returnStatus: true, script: 'adb -e uninstall com.appcelerator.testApp.testing' killAndroidEmulators() } // if } // finally