-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
45 lines (41 loc) · 900 Bytes
/
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
pipeline {
agent {
label 'android'
}
stages {
stage('Compile') {
steps {
sh './gradlew compileDebugSources'
}
}
stage('Unit test') {
steps {
sh './gradlew testDebugUnitTest testDebugUnitTest'
junit '**/TEST-*.xml'
}
}
stage('Build APK') {
steps {
sh './gradlew assembleDebug'
archiveArtifacts '**/*.apk'
}
}
stage('Static analysis') {
steps {
sh './gradlew lintDebug'
androidLint(pattern: '**/lint-results-*.xml')
}
}
}
post {
success {
mail(to: 'khunzohn@codigo.sg', subject: 'New build available!', body: 'Check it out!')
}
failure {
mail(to: 'khunzohn@codigo.sg', subject: 'Oops!', body: "Build ${env.BUILD_NUMBER} failed; ${env.BUILD_URL}")
}
}
options {
skipStagesAfterUnstable()
}
}