-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathJenkinsfile-continuous
More file actions
52 lines (48 loc) · 2.13 KB
/
Jenkinsfile-continuous
File metadata and controls
52 lines (48 loc) · 2.13 KB
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
#!groovy
pipeline {
agent { label 'java8 && small && dev' }
tools {
maven 'Maven 3 (latest)'
jdk 'Latest'
}
stages {
stage('Init') {
steps {
script {
currentBuild.displayName = "#${env.BUILD_NUMBER}: Branch ${env.BRANCH_NAME}"
currentBuild.description = "Branch ${env.BRANCH_NAME}"
}
}
}
stage('Build') {
steps {
sh 'mvn clean verify -P code-coverage'
}
}
}
post {
success {
junit '**/surefire-reports/*.xml,**/failsafe-reports/*.xml'
jacoco classPattern: '**/target/classes', exclusionPattern: '**/*Test.class,**/*_*.class', execPattern: '**/jacoco.xml,**/jacoco-it.xml', inclusionPattern: '**/*.class'
slackSend channel: '#leeroy-jenkins',
color: "good",
message: "${env.JOB_NAME} - ${env.BUILD_DISPLAY_NAME} ${currentBuild.currentResult} after ${currentBuild.durationString} (<${env.BUILD_URL}|Open>)"
}
unstable {
junit '**/surefire-reports/*.xml,**/failsafe-reports/*.xml'
jacoco classPattern: '**/target/classes', exclusionPattern: '**/*Test.class,**/*_*.class', execPattern: '**/jacoco.xml,**/jacoco-it.xml', inclusionPattern: '**/*.class'
slackSend channel: '#leeroy-jenkins',
color: "warning",
message: "${env.JOB_NAME} - ${env.BUILD_DISPLAY_NAME} ${currentBuild.currentResult} after ${currentBuild.durationString} (<${env.BUILD_URL}|Open>)"
}
failure {
slackSend channel: '#leeroy-jenkins',
color: "danger",
message: "${env.JOB_NAME} - ${env.BUILD_DISPLAY_NAME} ${currentBuild.currentResult} after ${currentBuild.durationString} (<${env.BUILD_URL}|Open>)"
}
aborted {
slackSend channel: '#leeroy-jenkins',
message: "${env.JOB_NAME} - ${env.BUILD_DISPLAY_NAME} ${currentBuild.currentResult} after ${currentBuild.durationString} (<${env.BUILD_URL}|Open>)"
}
}
}