-
Notifications
You must be signed in to change notification settings - Fork 8
/
Jenkinsfile
58 lines (50 loc) · 1.55 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
#!groovy
def oss = ["linux"]
def jdks = ["jdk17", "jdk21"]
def builds = [:]
for (def os in oss) {
for (def jdk in jdks) {
builds[os + "_" + jdk] = newBuild(os, jdk)
}
}
parallel builds
def newBuild(os, jdk) {
return {
node(os) {
def mvnName = 'maven3'
def settingsName = 'oss-settings.xml'
def mvnOpts = '-Xms2g -Xmx4g -Djava.awt.headless=true'
stage("Checkout - ${jdk}") {
checkout scm
}
stage("Build - ${jdk}") {
timeout(time: 1, unit: 'HOURS') {
withMaven(maven: mvnName,
jdk: jdk,
publisherStrategy: 'EXPLICIT',
globalMavenSettingsConfig: settingsName,
mavenOpts: mvnOpts) {
sh "mvn -V -B clean install -Dmaven.test.failure.ignore=true -e"
}
junit testResults: '**/target/surefire-reports/TEST-*.xml'
// Collect the JaCoCo execution results.
jacoco inclusionPattern: '**/org/mortbay/jetty/load/generator/**/*.class',
execPattern: '**/target/jacoco.exec',
classPattern: '**/target/classes',
sourcePattern: '**/src/main/java'
}
}
stage("Javadoc - ${jdk}") {
timeout(time: 15, unit: 'MINUTES') {
withMaven(maven: mvnName,
jdk: jdk,
publisherStrategy: 'EXPLICIT',
globalMavenSettingsConfig: settingsName,
mavenOpts: mvnOpts) {
sh "mvn -V -B javadoc:javadoc -e"
}
}
}
}
}
}