Improve JenkinsFile ( mainly make DRY by extracting a variable )

This commit is contained in:
ligi 2016-03-16 09:53:39 +01:00
parent 59a20d119c
commit 32489ff16b

11
Jenkinsfile vendored
View file

@ -1,17 +1,20 @@
def flavorCombination='WithMapsWithAnalyticsForPlay'
stage 'assemble'
node {
checkout scm
sh "./gradlew clean assembleWithMapsWithAnalyticsforPlay"
sh "./gradlew clean assemble${flavorCombination}"
}
stage 'lint'
node {
checkout scm
sh "./gradlew lintWithMapsWithAnalyticsforPlayRelease"
publishHTML(target:[allowMissing: false, alwaysLinkToLastBuild: false, keepAll: false, reportDir: 'android/build/outputs/', reportFiles: 'lint-results-withMapsWithAnalyticsForPlayRelease.html', reportName: 'Lint reports'])
sh "./gradlew lint${flavorCombination}Release"
//publishHTML(target:[allowMissing: true, alwaysLinkToLastBuild: true, keepAll: true, reportDir: 'android/build/outputs/', reportFiles: 'lint-results-${flavorCombination}Release.html', reportName: 'Lint reports'])
}
stage 'UITest'
node {
sh "./gradlew spoonWithMapsWithAnalyticsforPlay"
sh "./gradlew spoon${flavorCombination}"
publishHTML(target:[allowMissing: true, alwaysLinkToLastBuild: true, keepAll: true, reportDir: 'android/build/spoon-output/${flavorCombination}DebugAndroidTest/', reportFiles: 'index.html', reportName: 'Spoon reports'])
}