-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathJenkinsfile
More file actions
52 lines (50 loc) · 1.49 KB
/
Jenkinsfile
File metadata and controls
52 lines (50 loc) · 1.49 KB
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
49
50
51
52
pipeline {
agent {
label 'android'
}
stages {
stage('Test') {
when {
anyOf {
branch 'master'
changeRequest()
}
}
parallel {
stage('Unit Test') {
steps {
sh './gradlew --info clean unitTest'
}
post {
always { junit '**/TEST-*.xml' }
}
}
stage('Lint Test') {
steps {
sh './gradlew clean lintRelease'
androidLint pattern: '**/lint-results-*.xml'
}
}
}
}
stage('Merge Build') {
when { changeRequest() }
steps {
sh './gradlew clean assembleRelease'
}
}
stage('Release Build') {
when { branch 'master' }
steps {
sh "./gradlew clean assembleRelease -PbuildNumber=${env.BUILD_NUMBER}"
archiveArtifacts '**/*release.apk'
}
}
}
/*post {
failure {
// notify team of the failure
//mail to: 'somebody@liveperson.com', subject: "${env.JOB_NAME} Failed", charset: 'UTF-8', mimeType: 'text/html', body: "Project: ${env.JOB_NAME} <br>Build Number: ${env.BUILD_NUMBER} <br><br> ${env.BUILD_URL}"
}
}*/
}