forked from apache/maven-integration-testing
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
64 lines (61 loc) · 1.79 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
#!groovy
pipeline {
agent any
// save some io during the build
options { durabilityHint('PERFORMANCE_OPTIMIZED') }
stages {
stage("Parallel Stage") {
parallel {
stage("Build / Test - mvn latest - JDK8 - ubuntu") {
agent { node { label 'ubuntu' } }
steps {
timeout( time: 180, unit: 'MINUTES' ) {
mavenBuild( "jdk_1.8_latest", "maven_latest")
}
}
}
stage("Build / Test - mvn latest - JDK11 - ubuntu") {
agent { node { label 'ubuntu' } }
steps {
timeout( time: 180, unit: 'MINUTES' ) {
mavenBuild( "jdk_11_latest", "maven_latest")
}
}
}
stage("Build / Test - mvn latest - JDK8 - windowx") {
agent { node { label 'Windows' } }
steps {
timeout( time: 180, unit: 'MINUTES' ) {
mavenBuild( "jdk_1.8_latest", "maven_latest")
}
}
}
stage("Build / Test - mvn latest - JDK11 - windows") {
agent { node { label 'Windows' } }
steps {
timeout( time: 180, unit: 'MINUTES' ) {
mavenBuild( "jdk_11_latest", "maven_latest")
}
}
}
}
}
}
}
def mavenBuild(jdk, mvnName) {
script {
try {
withMaven(jdk: "$jdk", maven: "$mvnName", publisherStrategy: 'EXPLICIT', mavenOpts: "-Xms2g -Xmx4g -Djava.awt.headless=true") {
if (isUnix()) {
sh "mvn -V clean install -Prun-its,embedded -B"
} else {
bat "mvn -V clean install -Prun-its,embedded -B"
}
}
}
finally
{
junit testResults: 'core-it-suite/target/surefire-reports/*.xml', allowEmptyResults: true
}
}
}