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