2018-01-31 20:44:55 -05:00
|
|
|
#!groovy
|
2018-01-31 20:46:35 -05:00
|
|
|
|
2022-07-08 05:06:04 -04:00
|
|
|
/**
|
|
|
|
* IMPORTANT: Changes here need to be reflected in 2 other files as well.
|
|
|
|
* pom.xml
|
|
|
|
* build/scripts/ci.sh
|
|
|
|
*/
|
|
|
|
|
2018-11-12 11:12:15 -05:00
|
|
|
pipeline {
|
2022-05-03 09:50:54 -04:00
|
|
|
agent {
|
|
|
|
node { label 'linux' }
|
|
|
|
}
|
2019-02-21 09:45:12 -05:00
|
|
|
// save some io during the build
|
2022-07-10 21:28:34 -04:00
|
|
|
options {
|
|
|
|
skipDefaultCheckout()
|
|
|
|
durabilityHint('PERFORMANCE_OPTIMIZED')
|
|
|
|
}
|
2019-02-21 09:45:12 -05:00
|
|
|
stages {
|
2022-07-08 05:06:04 -04:00
|
|
|
stage("Checkout Jetty") {
|
|
|
|
steps {
|
|
|
|
container('jetty-build') {
|
|
|
|
dir("${env.WORKSPACE}/buildy") {
|
|
|
|
checkout scm
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage("Build & Test - JDK17") {
|
|
|
|
stages {
|
|
|
|
stage("Setup") {
|
|
|
|
steps {
|
|
|
|
container('jetty-build') {
|
|
|
|
timeout(time: 120, unit: 'MINUTES') {
|
|
|
|
dir("${env.WORKSPACE}/buildy") {
|
|
|
|
echo "Install org.eclipse.jetty:build-resources"
|
|
|
|
mavenBuild("jdk17", "clean install -f build", "maven3")
|
|
|
|
echo "Install org.eclipse.jetty:jetty-project"
|
|
|
|
mavenBuild("jdk17", "-N clean install", "maven3")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage("Module : /jetty-core/") {
|
|
|
|
steps {
|
|
|
|
container('jetty-build') {
|
|
|
|
timeout(time: 120, unit: 'MINUTES') {
|
|
|
|
dir("${env.WORKSPACE}/buildy") {
|
|
|
|
mavenBuild("jdk17", "clean install -f jetty-core", "maven3")
|
2022-07-10 07:51:58 -04:00
|
|
|
mavenBuild("jdk17", "clean -f jetty-core", "maven3")
|
2022-07-08 05:06:04 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage("Module : /jetty-integrations/") {
|
|
|
|
steps {
|
|
|
|
container('jetty-build') {
|
|
|
|
timeout(time: 120, unit: 'MINUTES') {
|
|
|
|
dir("${env.WORKSPACE}/buildy") {
|
|
|
|
//cleanup all projects
|
|
|
|
mavenBuild("jdk17", "clean install -f jetty-integrations", "maven3")
|
2022-07-10 07:51:58 -04:00
|
|
|
mavenBuild("jdk17", "clean -f jetty-integrations", "maven3")
|
2022-07-08 05:06:04 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage("Module : /jetty-ee10/") {
|
|
|
|
steps {
|
|
|
|
container('jetty-build') {
|
|
|
|
timeout(time: 120, unit: 'MINUTES') {
|
|
|
|
dir("${env.WORKSPACE}/buildy") {
|
|
|
|
//cleanup all projects
|
|
|
|
mavenBuild("jdk17", "clean install -f jetty-ee10", "maven3")
|
2022-07-10 07:51:58 -04:00
|
|
|
mavenBuild("jdk17", "clean -f jetty-ee10", "maven3")
|
2022-07-08 05:06:04 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage("Module : /jetty-ee9/") {
|
|
|
|
steps {
|
|
|
|
container('jetty-build') {
|
|
|
|
timeout(time: 120, unit: 'MINUTES') {
|
|
|
|
dir("${env.WORKSPACE}/buildy") {
|
|
|
|
//cleanup all projects
|
|
|
|
mavenBuild("jdk17", "clean install -f jetty-ee9", "maven3")
|
2022-07-10 07:51:58 -04:00
|
|
|
mavenBuild("jdk17", "clean -f jetty-ee9", "maven3")
|
2022-07-08 05:06:04 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage("Module : /jetty-ee8/") {
|
|
|
|
steps {
|
|
|
|
container('jetty-build') {
|
|
|
|
timeout(time: 120, unit: 'MINUTES') {
|
|
|
|
dir("${env.WORKSPACE}/buildy") {
|
|
|
|
//cleanup all projects
|
|
|
|
mavenBuild("jdk17", "clean install -f jetty-ee8", "maven3")
|
2022-07-10 07:51:58 -04:00
|
|
|
mavenBuild("jdk17", "clean -f jetty-ee8", "maven3")
|
2022-07-08 05:06:04 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage("Module : /jetty-home/") {
|
|
|
|
steps {
|
|
|
|
container('jetty-build') {
|
|
|
|
timeout(time: 120, unit: 'MINUTES') {
|
|
|
|
dir("${env.WORKSPACE}/buildy") {
|
|
|
|
//cleanup all projects
|
|
|
|
mavenBuild("jdk17", "clean install -pl :jetty-home", "maven3")
|
2022-07-10 07:51:58 -04:00
|
|
|
mavenBuild("jdk17", "clean -pl :jetty-home", "maven3")
|
2022-07-08 05:06:04 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage("Module : /tests/") {
|
|
|
|
steps {
|
|
|
|
container('jetty-build') {
|
|
|
|
timeout(time: 120, unit: 'MINUTES') {
|
|
|
|
dir("${env.WORKSPACE}/buildy") {
|
|
|
|
//cleanup all projects
|
|
|
|
mavenBuild("jdk17", "clean install -f tests", "maven3")
|
2022-07-10 07:51:58 -04:00
|
|
|
mavenBuild("jdk17", "clean -f tests", "maven3")
|
2022-07-08 05:06:04 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/*
|
|
|
|
stage("Module : /jetty-p2/") {
|
|
|
|
steps {
|
|
|
|
container('jetty-build') {
|
|
|
|
timeout(time: 120, unit: 'MINUTES') {
|
|
|
|
dir("${env.WORKSPACE}/buildy") {
|
|
|
|
mavenBuild("jdk17", "clean install -f jetty-p2", "maven3")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
*/
|
|
|
|
stage("Module : /documentation/") {
|
2022-05-31 23:38:42 -04:00
|
|
|
steps {
|
|
|
|
container('jetty-build') {
|
2022-07-08 05:06:04 -04:00
|
|
|
timeout(time: 120, unit: 'MINUTES') {
|
|
|
|
dir("${env.WORKSPACE}/buildy") {
|
2022-07-22 15:12:50 -04:00
|
|
|
mavenBuild("jdk17", "clean install -rf :documentation", "maven3")
|
2022-07-08 05:06:04 -04:00
|
|
|
}
|
2022-05-31 23:38:42 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-08-13 12:11:10 -04:00
|
|
|
stage("Javadocs") {
|
|
|
|
steps {
|
|
|
|
container('jetty-build') {
|
|
|
|
timeout(time: 120, unit: 'MINUTES') {
|
|
|
|
dir("${env.WORKSPACE}/buildy") {
|
2022-08-13 15:13:40 -04:00
|
|
|
mavenBuild("jdk17", "clean install -DskipTests", "maven3")
|
|
|
|
mavenBuild("jdk17", "javadoc:javadoc", "maven3")
|
2022-08-13 12:11:10 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-05-30 06:34:42 -04:00
|
|
|
}
|
|
|
|
}
|
2019-08-14 10:39:06 -04:00
|
|
|
}
|
2018-01-31 20:24:31 -05:00
|
|
|
}
|
2019-06-28 04:04:43 -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.
|
|
|
|
* @return the Jenkinsfile step representing a maven build
|
|
|
|
*/
|
2020-12-10 20:47:26 -05:00
|
|
|
def mavenBuild(jdk, cmdline, mvnName) {
|
2022-06-29 18:11:49 -04:00
|
|
|
script {
|
2020-11-18 06:26:38 -05:00
|
|
|
try {
|
|
|
|
withEnv(["JAVA_HOME=${ tool "$jdk" }",
|
|
|
|
"PATH+MAVEN=${ tool "$jdk" }/bin:${tool "$mvnName"}/bin",
|
|
|
|
"MAVEN_OPTS=-Xms2g -Xmx4g -Djava.awt.headless=true"]) {
|
|
|
|
configFileProvider(
|
|
|
|
[configFile(fileId: 'oss-settings.xml', variable: 'GLOBAL_MVN_SETTINGS')]) {
|
2022-08-12 03:52:53 -04:00
|
|
|
sh "mvn -Dmaven.test.failure.ignore=true --no-transfer-progress -s $GLOBAL_MVN_SETTINGS -Dmaven.repo.local=.repository -Pci -DexcludedGroups=\"external, large-disk-resource, stress, slow\" -V -B -e -Djetty.testtracker.log=true $cmdline"
|
2020-11-18 06:26:38 -05:00
|
|
|
}
|
|
|
|
}
|
2020-09-10 23:11:04 -04:00
|
|
|
}
|
|
|
|
finally
|
|
|
|
{
|
2022-07-08 12:03:48 -04:00
|
|
|
junit testResults: '**/target/surefire-reports/*.xml,**/target/invoker-reports/TEST*.xml', allowEmptyResults: true, skipPublishingChecks: true
|
2020-11-18 06:26:38 -05:00
|
|
|
}
|
2022-06-29 18:11:49 -04:00
|
|
|
}
|
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
|