Skip to content

Commit

Permalink
build(jenkins): don't fail if post-build adb commands fail
Browse files Browse the repository at this point in the history
  • Loading branch information
sgtcoolguy committed May 14, 2019
1 parent add03e4 commit c4f6f25
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c4f6f25

Please sign in to comment.