-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
35 lines (35 loc) · 1.18 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
pipeline {
agent none
stages {
stage('Build') {
agent {
docker {
image 'obraun/fun-jenkins'
args '-v /home/jenkins/.stack:/home/jenkins/.stack'
}
}
steps {
sh 'stack --no-terminal test --only-dependencies'
sh 'stack --no-terminal test'
}
}
}
post {
changed {
script {
if (currentBuild.currentResult == 'FAILURE') { // Other values: SUCCESS, UNSTABLE
// Send an email only if the build status has changed from green/unstable to red
emailext subject: '$DEFAULT_SUBJECT',
body: '$DEFAULT_CONTENT',
recipientProviders: [
[$class: 'CulpritsRecipientProvider'],
[$class: 'DevelopersRecipientProvider'],
[$class: 'RequesterRecipientProvider']
],
replyTo: '$DEFAULT_REPLYTO',
to: '$DEFAULT_RECIPIENTS'
}
}
}
}
}