forked from ligi/SurvivalManual
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
48 lines (41 loc) · 1.66 KB
/
Jenkinsfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
node {
def flavorCombination='ProdWithFirebase'
def config="-Pgms"
stage 'checkout'
checkout scm
sh "git submodule update --init"
sh "git-crypt unlock"
stage 'UITest'
lock('adb') {
try {
sh "./gradlew clean spoon${flavorCombination} ${config}"
} catch(err) {
currentBuild.result = FAILURE
} finally {
publishHTML(target:[allowMissing: true, alwaysLinkToLastBuild: true, keepAll: true, reportDir: "android/build/spoon", reportFiles: '*/debug/index.html', reportName: 'Spoon'])
step([$class: 'JUnitResultArchiver', testResults: 'android/build/spoon/*/debug/junit-reports/*.xml'])
}
}
stage 'lint'
try {
sh "./gradlew clean 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'])
androidLint canComputeNew: false, defaultEncoding: '', healthy: '', pattern: '', unHealthy: ''
}
stage 'test'
try {
sh "./gradlew clean test${flavorCombination}DebugUnitTest"
} catch(err) {
currentBuild.result = FAILURE
} finally {
step([$class: 'JUnitResultArchiver', testResults: 'android/build/test-results/*/*/*.xml'])
publishHTML(target:[allowMissing: true, alwaysLinkToLastBuild: true, keepAll: true, reportDir: 'android/build/reports/tests/', reportFiles: "*/*/index.html", reportName: 'UnitTest'])
}
stage 'assemble'
sh "./gradlew clean assemble${flavorCombination}Release ${config}"
archive 'android/build/outputs/apk/*'
archive 'android/build/outputs/mapping/*/release/mapping.txt'
}