-
Notifications
You must be signed in to change notification settings - Fork 164
/
Jenkinsfile
91 lines (90 loc) · 3.37 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
pipeline {
agent any
stages {
stage('Preparation') {
steps {
checkout scm
}
}
stage('Assemble') {
steps {
sh './gradlew clean assemble'
}
post {
always {
archiveArtifacts '**/build/libs/*.jar'
}
}
}
stage('Unit tests') {
steps {
sh './gradlew test'
}
post {
always {
junit '**/build/test-results/test/*.xml'
}
}
}
stage('Parallel integration tests') {
parallel {
stage('Integration tests') {
steps {
sh './gradlew integTest'
}
post {
always {
junit '**/build/test-results/integTest/*.xml'
}
}
}
stage('JUnit4 Maven integration test') {
steps {
sh 'cd ${WORKSPACE}/junit4 && mvn test'
}
post {
always {
sh 'cd ${WORKSPACE}'
junit 'junit4/build/maven-target/surefire-reports/*.xml'
}
}
}
stage('JUnit Jupiter Maven integration test') {
steps {
sh 'cd ${WORKSPACE}/junit-jupiter && mvn test'
}
post {
always {
sh 'cd ${WORKSPACE}'
junit 'junit-jupiter/build/maven-target/surefire-reports/*.xml'
}
}
}
stage('JUnit Jupiter Parameterized Maven integration test') {
steps {
sh 'cd junit-jupiter-params && mvn test'
}
post {
always {
sh 'cd ${WORKSPACE}'
junit 'junit-jupiter-params/build/maven-target/surefire-reports/*.xml'
}
}
}
}
}
stage('Static code analyses') {
steps {
sh './gradlew build'
}
post {
always {
dry canComputeNew: false, defaultEncoding: '', healthy: '', pattern: 'build/reports/cpd/*.xml', unHealthy: ''
findbugs defaultEncoding: '', excludePattern: '**/*Test.java', healthy: '', includePattern: '', pattern: '**/build/reports/spotbugs/*.xml', unHealthy: '', unstableNewAll: '0'
jacoco classPattern: '**/build/classes/*/main/', execPattern: '**/build/jacoco/*.exec', sourcePattern: '**/src/main/java'
warnings canComputeNew: false, canResolveRelativePaths: false, categoriesPattern: '', consoleParsers: [[parserName: 'Java Compiler (Eclipse)'], [parserName: 'Java Compiler (javac)'], [parserName: 'JavaDoc Tool']], defaultEncoding: 'UTF-8', excludePattern: '', healthy: '', includePattern: '', messagesPattern: '', unHealthy: ''
}
}
}
}
}