2016-03-08 04:04:33 +00:00
|
|
|
node {
|
2016-06-21 11:40:26 +00:00
|
|
|
def flavorCombination='WithMapsWithAnalyticsForPlay'
|
|
|
|
|
|
|
|
stage 'checkout'
|
2016-03-08 04:04:33 +00:00
|
|
|
checkout scm
|
2016-03-15 07:05:07 +00:00
|
|
|
|
2016-06-21 11:40:26 +00:00
|
|
|
stage 'assemble'
|
|
|
|
sh "./gradlew clean assemble${flavorCombination}Release"
|
|
|
|
archive 'android/build/outputs/apk/*'
|
|
|
|
|
|
|
|
stage 'lint'
|
2016-07-18 00:33:42 +00:00
|
|
|
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'])
|
|
|
|
}
|
|
|
|
|
2016-06-21 11:40:26 +00:00
|
|
|
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'])
|
|
|
|
|
|
|
|
stage 'UITest'
|
|
|
|
lock('adb') {
|
2016-06-23 08:10:01 +00:00
|
|
|
try {
|
|
|
|
sh "./gradlew spoon${flavorCombination}"
|
|
|
|
} catch(err) {
|
|
|
|
currentBuild.result = FAILURE
|
|
|
|
} finally {
|
|
|
|
publishHTML(target:[allowMissing: true, alwaysLinkToLastBuild: true, keepAll: true, reportDir: "android/build/spoon-output/${flavorCombination}DebugAndroidTest", reportFiles: 'index.html', reportName: 'Spoon'])
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2016-06-21 11:40:26 +00:00
|
|
|
|
2016-03-08 04:04:33 +00:00
|
|
|
|
2016-04-06 00:30:23 +00:00
|
|
|
|
2016-03-08 04:04:33 +00:00
|
|
|
}
|