-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
43 lines (39 loc) · 1.19 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
// Declarative pipeline, see https://jenkins.io/doc/book/pipeline/syntax/#declarative-pipeline
pipeline {
agent any
triggers {
pollSCM('H/30 * * * *')
}
tools {
maven 'maven-3.5.0'
jdk 'jdk-8'
}
options {
timestamps()
timeout(time: 1, unit: 'HOURS')
buildDiscarder(logRotator(numToKeepStr:'10'))
disableConcurrentBuilds()
}
stages {
stage('Build and test') {
steps {
sh 'mvn clean verify -U'
}
}
}
post {
always {
junit allowEmptyResults: true, testResults: 'target/surefire-reports/*.xml'
}
unstable {
emailext body: '''${SCRIPT, template="junit-standard.html.template"}''',
subject: '$PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS!',
to: '[email protected]'
}
failure {
emailext body: '''${SCRIPT, template="junit-standard.html.template"}''',
subject: '$PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS!',
to: '[email protected]'
}
}
}