forked from eclipse/oneofour
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
31 lines (31 loc) · 983 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
pipeline {
agent any
tools {
maven 'apache-maven-3.6.3'
jdk 'adoptopenjdk-hotspot-jdk8-latest'
}
stages {
stage('Build') {
steps {
sh '''
mvn --version
mvn clean install
'''
}
}
}
post {
// send a mail on unsuccessful and fixed builds
unsuccessful { // means unstable || failure || aborted
emailext subject: 'Build $BUILD_STATUS $PROJECT_NAME #$BUILD_NUMBER!',
body: '''Check attached console output or $BUILD_URL to view the results.''',
recipientProviders: [culprits(), requestor()],
attachLog: true
}
fixed { // back to normal
emailext subject: 'Build $BUILD_STATUS $PROJECT_NAME #$BUILD_NUMBER!',
body: '''Check $BUILD_URL to view the results.''',
recipientProviders: [culprits(), requestor()]
}
}
}