2018-02-01 11:44:55 +10:00
|
|
|
#!groovy
|
2018-02-01 11:46:35 +10:00
|
|
|
|
2018-09-07 14:56:31 -05:00
|
|
|
// def jdks = ["jdk8","jdk9","jdk10","jdk11"]
|
2018-09-12 19:10:46 -05:00
|
|
|
def mainJdk = "jdk11"
|
|
|
|
def jdks = [mainJdk]
|
2018-09-04 19:07:17 -05:00
|
|
|
def oss = ["linux"]
|
2018-02-01 14:29:08 +10:00
|
|
|
def builds = [:]
|
2018-02-04 09:45:25 +10:00
|
|
|
for (def os in oss) {
|
|
|
|
for (def jdk in jdks) {
|
2018-09-14 15:17:50 +10:00
|
|
|
builds[os+"_"+jdk] = getFullBuild( jdk, os, mainJdk == jdk )
|
2018-02-04 09:45:25 +10:00
|
|
|
}
|
2018-02-01 14:29:08 +10:00
|
|
|
}
|
2018-02-04 09:45:25 +10:00
|
|
|
|
2018-02-01 16:27:43 +10:00
|
|
|
parallel builds
|
2016-07-25 16:06:01 -07:00
|
|
|
|
2018-09-14 15:17:50 +10:00
|
|
|
def getFullBuild(jdk, os, mainJdk) {
|
2018-02-01 14:29:08 +10:00
|
|
|
return {
|
2018-02-04 09:46:53 +10:00
|
|
|
node(os) {
|
2018-02-01 14:29:08 +10:00
|
|
|
// System Dependent Locations
|
2018-04-20 17:48:08 +10:00
|
|
|
def mvnName = 'maven3.5'
|
2018-09-04 19:07:17 -05:00
|
|
|
def localRepo = "${env.JENKINS_HOME}/${env.EXECUTOR_NUMBER}" // ".repository" //
|
2018-04-21 10:39:18 +10:00
|
|
|
def settingsName = 'oss-settings.xml'
|
2018-06-15 17:13:05 +10:00
|
|
|
def mavenOpts = '-Xms1g -Xmx4g -Djava.awt.headless=true'
|
2016-07-25 16:06:01 -07:00
|
|
|
|
2018-09-14 15:17:50 +10:00
|
|
|
stage("Build / Test - $jdk") {
|
2018-09-10 02:03:26 -05:00
|
|
|
timeout(time: 120, unit: 'MINUTES') {
|
2018-09-07 15:22:45 -05:00
|
|
|
// Checkout
|
|
|
|
checkout scm
|
|
|
|
withMaven(
|
2018-09-03 16:19:18 +10:00
|
|
|
maven: mvnName,
|
|
|
|
jdk: "$jdk",
|
|
|
|
publisherStrategy: 'EXPLICIT',
|
|
|
|
globalMavenSettingsConfig: settingsName,
|
|
|
|
mavenOpts: mavenOpts,
|
|
|
|
mavenLocalRepo: localRepo) {
|
2018-09-07 15:22:45 -05:00
|
|
|
// Compile only
|
|
|
|
sh "mvn -V -B clean install -DskipTests -T6 -e"
|
|
|
|
// Javadoc only
|
|
|
|
sh "mvn -V -B javadoc:javadoc -T6 -e"
|
|
|
|
// Testing
|
2018-09-22 21:31:01 +10:00
|
|
|
sh "mvn -V -B install -Dmaven.test.failure.ignore=true -T5 -e -Djetty.testtracker.log=true -Pmongodb -Dunix.socket.tmp=" + env.JENKINS_HOME
|
2016-07-25 16:06:01 -07:00
|
|
|
|
2018-09-07 15:22:45 -05:00
|
|
|
// Compact 3 build
|
2018-09-14 15:17:50 +10:00
|
|
|
if (mainJdk) {
|
2018-09-07 15:22:45 -05:00
|
|
|
sh "mvn -f aggregates/jetty-all-compact3 -V -B -Pcompact3 clean install -T5"
|
|
|
|
}
|
|
|
|
}
|
2016-10-20 11:29:24 -07:00
|
|
|
}
|
2016-07-25 16:06:01 -07:00
|
|
|
|
2018-09-07 14:56:31 -05:00
|
|
|
// Report failures in the jenkins UI
|
2018-09-07 15:22:45 -05:00
|
|
|
junit testResults: '**/target/surefire-reports/TEST-*.xml,**/target/failsafe-reports/TEST-*.xml'
|
2018-09-07 14:56:31 -05:00
|
|
|
consoleParsers = [[parserName: 'JavaDoc'],
|
|
|
|
[parserName: 'JavaC']];
|
2018-09-07 15:22:45 -05:00
|
|
|
|
2018-09-14 15:17:50 +10:00
|
|
|
if (mainJdk) {
|
2018-09-07 14:56:31 -05:00
|
|
|
// Collect up the jacoco execution results
|
|
|
|
def jacocoExcludes =
|
2018-09-22 20:11:03 +10:00
|
|
|
// build tools
|
|
|
|
"**/org/eclipse/jetty/ant/**" + ",**/org/eclipse/jetty/maven/**" +
|
|
|
|
",**/org/eclipse/jetty/jspc/**" +
|
|
|
|
// example code / documentation
|
|
|
|
",**/org/eclipse/jetty/embedded/**" + ",**/org/eclipse/jetty/asyncrest/**" +
|
|
|
|
",**/org/eclipse/jetty/demo/**" +
|
|
|
|
// special environments / late integrations
|
|
|
|
",**/org/eclipse/jetty/gcloud/**" + ",**/org/eclipse/jetty/infinispan/**" +
|
2018-09-22 21:29:29 +10:00
|
|
|
",**/org/eclipse/jetty/osgi/**" + ",**/org/eclipse/jetty/spring/**" +SPIServerTest
|
2018-09-22 20:11:03 +10:00
|
|
|
",**/org/eclipse/jetty/http/spi/**" +
|
|
|
|
// test classes
|
|
|
|
",**/org/eclipse/jetty/tests/**" + ",**/org/eclipse/jetty/test/**";
|
2018-09-07 14:56:31 -05:00
|
|
|
jacoco inclusionPattern: '**/org/eclipse/jetty/**/*.class',
|
2018-09-22 20:11:03 +10:00
|
|
|
exclusionPattern: jacocoExcludes,
|
|
|
|
execPattern: '**/target/jacoco.exec',
|
|
|
|
classPattern: '**/target/classes',
|
|
|
|
sourcePattern: '**/src/main/java'
|
2018-09-07 14:56:31 -05:00
|
|
|
consoleParsers = [[parserName: 'Maven'],
|
|
|
|
[parserName: 'JavaDoc'],
|
|
|
|
[parserName: 'JavaC']];
|
2016-10-20 11:29:24 -07:00
|
|
|
}
|
2018-09-07 14:56:31 -05:00
|
|
|
|
|
|
|
// Report on Maven and Javadoc warnings
|
2018-09-07 15:22:45 -05:00
|
|
|
step([$class : 'WarningsPublisher',
|
|
|
|
consoleParsers: consoleParsers])
|
2016-08-15 15:22:53 -07:00
|
|
|
}
|
2018-02-01 11:24:31 +10:00
|
|
|
}
|
2016-07-25 16:06:01 -07:00
|
|
|
}
|
2018-02-01 11:48:13 +10:00
|
|
|
}
|
2016-07-26 07:25:23 -07:00
|
|
|
|
2018-09-22 20:11:03 +10:00
|
|
|
// vim: et:ts=2:sw=2:ft=groovy
|