forked from linagora/gatling-imap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
45 lines (42 loc) · 1.26 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
pipeline {
agent {
label "gatling"
}
options {
// Configure an overall timeout for the build.
timeout(time: 1, unit: 'HOURS')
}
stages {
stage('Compile') {
steps {
sh 'sbt clean compile'
}
}
stage('Test') {
steps {
sh 'docker pull linagora/tmail-backend:memory-branch-master'
sh 'sbt GatlingIt/test'
}
post {
always {
deleteDir() /* clean up our workspace */
}
}
}
}
post {
failure {
script {
if (env.BRANCH_NAME == "master") {
emailext(
subject: "[BUILD-FAILURE]: Job '${env.JOB_NAME} [${env.BRANCH_NAME}] [${env.BUILD_NUMBER}]'",
body: """
BUILD-FAILURE: Job '${env.JOB_NAME} [${env.BRANCH_NAME}] [${env.BUILD_NUMBER}]'. Check console output at "<a href="${env.BUILD_URL}">${env.JOB_NAME} [${env.BRANCH_NAME}] [${env.BUILD_NUMBER}]</a>".
""",
to: "[email protected]"
)
}
}
}
}
}