Change the order of execution
This commit is contained in:
parent
e1ac85c0ed
commit
cde951ee9b
1 changed files with 21 additions and 20 deletions
41
Jenkinsfile
vendored
41
Jenkinsfile
vendored
|
@ -2,35 +2,36 @@ node {
|
|||
def flavorCombination='WithMapsWithAnalyticsForPlay'
|
||||
|
||||
stage 'checkout'
|
||||
checkout scm
|
||||
|
||||
stage 'assemble'
|
||||
sh "./gradlew clean assemble${flavorCombination}Release"
|
||||
archive 'android/build/outputs/apk/*'
|
||||
|
||||
stage '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'])
|
||||
checkout scm
|
||||
|
||||
stage 'UITest'
|
||||
lock('adb') {
|
||||
lock('adb') {
|
||||
try {
|
||||
sh "./gradlew spoon${flavorCombination}"
|
||||
sh "./gradlew clean 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'])
|
||||
}
|
||||
|
||||
stage 'assemble'
|
||||
sh "./gradlew assemble${flavorCombination}Release"
|
||||
archive 'android/build/outputs/apk/*'
|
||||
|
||||
stage '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'])
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue