forked from cometd/cometd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
58 lines (50 loc) · 1.57 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 = ["jdk8", "jdk11"]
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.5'
def settingsName = 'oss-settings.xml'
def mvnOpts = '-Xms1g -Xmx1g -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 exclusionPattern: '**/org/webtide/**,**/org/cometd/benchmark/**,**/org/cometd/examples/**',
execPattern: '**/target/jacoco.exec',
classPattern: '**/target/classes',
sourcePattern: '**/src/main/java'
}
}
stage("Javadoc - ${jdk}") {
timeout(time: 5, unit: 'MINUTES') {
withMaven(maven: mvnName,
jdk: jdk,
publisherStrategy: 'EXPLICIT',
globalMavenSettingsConfig: settingsName,
mavenOpts: mvnOpts) {
sh "mvn -V -B javadoc:javadoc -e"
}
}
}
}
}
}