-
Notifications
You must be signed in to change notification settings - Fork 45
/
Copy pathJenkinsfile
52 lines (52 loc) · 1.61 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
49
50
51
52
pipeline {
agent any
tools {
jdk 'JDK 8'
}
options {
ansiColor('xterm')
timestamps()
timeout(time: 30, unit: 'MINUTES')
}
stages {
stage('Build') {
steps {
sh '''
sh ./gradlew clean build
'''
}
post {
always {
junit '**/build/test-results/**/*.xml'
archiveArtifacts artifacts: 'build/distributions/*.zip', fingerprint: true
}
}
}
}
post {
failure {
emailext(
mimeType: 'text/html',
body: '${JELLY_SCRIPT,template="html"}',
recipientProviders: [
[$class: 'CulpritsRecipientProvider'],
[$class: 'DevelopersRecipientProvider'],
[$class: 'RequesterRecipientProvider']
],
subject: 'Build failed - ${JOB_NAME}'
)
}
unstable {
emailext(
mimeType: 'text/html',
body: '${JELLY_SCRIPT,template="html"}',
recipientProviders: [
[$class: 'CulpritsRecipientProvider'],
[$class: 'DevelopersRecipientProvider'],
[$class: 'RequesterRecipientProvider']
],
subject: 'Build unstable - ${JOB_NAME}'
)
}
}
}