Publish lint report on critical error

This commit is contained in:
ligi 2016-07-18 02:33:42 +02:00
parent b9930e6dad
commit e1ac85c0ed

11
Jenkinsfile vendored
View file

@ -9,9 +9,14 @@ node {
archive 'android/build/outputs/apk/*'
stage 'lint'
sh "./gradlew lint${flavorCombination}Release"
publishHTML(target:[allowMissing: true, alwaysLinkToLastBuild: true, keepAll: true, reportDir: 'android/build/outputs/', reportFiles: "lint-results-*Release.html", reportName: 'Lint'])
try {
sh "./gradlew lint${flavorCombination}Release"
} catch(err) {
currentBuild.result = FAILURE
} finally {
publishHTML(target:[allowMissing: true, alwaysLinkToLastBuild: true, keepAll: true, reportDir: 'android/build/outputs/', reportFiles: "lint-results-*Release.html", reportName: 'Lint'])
}
stage 'test'
sh "./gradlew test${flavorCombination}DebugUnitTest"
publishHTML(target:[allowMissing: true, alwaysLinkToLastBuild: true, keepAll: true, reportDir: 'android/build/reports/tests/', reportFiles: "*/index.html", reportName: 'UnitTest'])