2018-01-31 20:44:55 -05:00
|
|
|
#!groovy
|
2018-01-31 20:46:35 -05:00
|
|
|
|
2018-11-12 11:12:15 -05:00
|
|
|
pipeline {
|
2019-02-21 09:45:12 -05:00
|
|
|
agent any
|
|
|
|
// save some io during the build
|
|
|
|
options { durabilityHint('PERFORMANCE_OPTIMIZED') }
|
|
|
|
stages {
|
|
|
|
stage("Parallel Stage") {
|
|
|
|
parallel {
|
|
|
|
stage("Build / Test - JDK11") {
|
|
|
|
agent { node { label 'linux' } }
|
|
|
|
options { timeout(time: 120, unit: 'MINUTES') }
|
|
|
|
steps {
|
|
|
|
mavenBuild("jdk11", "-Pautobahn -Pmongodb install", "maven3", false)
|
|
|
|
// Collect up the jacoco execution results (only on main build)
|
|
|
|
jacoco inclusionPattern: '**/org/eclipse/jetty/**/*.class',
|
|
|
|
exclusionPattern: '' +
|
|
|
|
// 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/**',
|
|
|
|
execPattern: '**/target/jacoco.exec',
|
|
|
|
classPattern: '**/target/classes',
|
|
|
|
sourcePattern: '**/src/main/java'
|
|
|
|
warnings consoleParsers: [[parserName: 'Maven'], [parserName: 'Java']]
|
|
|
|
maven_invoker reportsFilenamePattern: "**/target/invoker-reports/BUILD*.xml", invokerBuildDir: "**/target/it"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
stage("Build / Test - JDK11") {
|
|
|
|
agent { node { label 'linux' } }
|
|
|
|
options { timeout(time: 120, unit: 'MINUTES') }
|
|
|
|
steps {
|
|
|
|
mavenBuild("jdk11", "-Pmongodb install", "maven3", false)
|
|
|
|
warnings consoleParsers: [[parserName: 'Maven'], [parserName: 'Java']]
|
|
|
|
maven_invoker reportsFilenamePattern: "**/target/invoker-reports/BUILD*.xml", invokerBuildDir: "**/target/it"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
stage("Build Javadoc") {
|
|
|
|
agent { node { label 'linux' } }
|
|
|
|
options { timeout(time: 30, unit: 'MINUTES') }
|
|
|
|
steps {
|
|
|
|
mavenBuild("jdk8", "install javadoc:javadoc -DskipTests", "maven3", true)
|
|
|
|
warnings consoleParsers: [[parserName: 'Maven'], [parserName: 'JavaDoc'], [parserName: 'Java']]
|
|
|
|
}
|
|
|
|
}
|
2018-10-09 00:37:52 -04:00
|
|
|
|
2018-11-15 08:11:03 -05:00
|
|
|
/* Deprecated in Jetty build, will be removed in future.
|
|
|
|
stage("Build Compact3") {
|
|
|
|
agent { node { label 'linux' } }
|
|
|
|
options { timeout(time: 120, unit: 'MINUTES') }
|
|
|
|
steps {
|
|
|
|
mavenBuild("jdk11", "-Pcompact3 install -DskipTests")
|
|
|
|
warnings consoleParsers: [[parserName: 'Maven'], [parserName: 'Java']]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
*/
|
|
|
|
}
|
2016-10-20 14:29:24 -04:00
|
|
|
}
|
2018-11-01 11:13:16 -04:00
|
|
|
}
|
2018-01-31 20:24:31 -05:00
|
|
|
}
|
2018-09-07 15:56:31 -04:00
|
|
|
|
2018-11-13 08:24:29 -05:00
|
|
|
/**
|
|
|
|
* To other developers, if you are using this method above, please use the following syntax.
|
|
|
|
*
|
|
|
|
* mavenBuild("<jdk>", "<profiles> <goals> <plugins> <properties>"
|
|
|
|
*
|
|
|
|
* @param jdk the jdk tool name (in jenkins) to use for this build
|
|
|
|
* @param cmdline the command line in "<profiles> <goals> <properties>"`format.
|
2018-12-14 21:35:16 -05:00
|
|
|
* @paran mvnName maven installation to use
|
2018-11-13 08:24:29 -05:00
|
|
|
* @return the Jenkinsfile step representing a maven build
|
|
|
|
*/
|
2019-02-21 09:45:12 -05:00
|
|
|
def mavenBuild(jdk, cmdline, mvnName, junitPublishDisabled) {
|
2018-12-14 21:35:16 -05:00
|
|
|
def localRepo = "${env.JENKINS_HOME}/${env.EXECUTOR_NUMBER}" // ".repository" //
|
2019-02-21 09:45:12 -05:00
|
|
|
def settingsName = 'oss-settings.xml'
|
2018-12-14 21:35:16 -05:00
|
|
|
def mavenOpts = '-Xms1g -Xmx4g -Djava.awt.headless=true'
|
2018-01-31 20:48:13 -05:00
|
|
|
|
2019-02-21 09:45:12 -05:00
|
|
|
withMaven(
|
|
|
|
maven: mvnName,
|
|
|
|
jdk: "$jdk",
|
|
|
|
publisherStrategy: 'EXPLICIT',
|
|
|
|
globalMavenSettingsConfig: settingsName,
|
|
|
|
options: [junitPublisher(disabled: junitPublishDisabled),mavenLinkerPublisher(disabled: false),pipelineGraphPublisher(disabled: false)],
|
|
|
|
mavenOpts: mavenOpts,
|
|
|
|
mavenLocalRepo: localRepo) {
|
|
|
|
// Some common Maven command line + provided command line
|
|
|
|
sh "mvn -V -B -T3 -e -fae -Dmaven.test.failure.ignore=true -Djetty.testtracker.log=true $cmdline -Dunix.socket.tmp=" + env.JENKINS_HOME
|
|
|
|
}
|
2018-01-31 20:48:13 -05:00
|
|
|
}
|
2016-07-26 10:25:23 -04:00
|
|
|
|
2018-11-27 19:12:07 -05:00
|
|
|
// vim: et:ts=2:sw=2:ft=groovy
|