jetty.project/Jenkinsfile

204 lines
6.5 KiB
Plaintext
Raw Normal View History

#!groovy
/**
* IMPORTANT: Changes here need to be reflected in 2 other files as well.
* pom.xml
* build/scripts/ci.sh
*/
pipeline {
agent {
node { label 'linux' }
}
// save some io during the build
2022-07-10 21:28:34 -04:00
options {
skipDefaultCheckout()
durabilityHint('PERFORMANCE_OPTIMIZED')
}
stages {
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")
mavenBuild("jdk17", "clean -f jetty-core", "maven3")
}
}
}
}
}
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")
mavenBuild("jdk17", "clean -f jetty-integrations", "maven3")
}
}
}
}
}
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")
mavenBuild("jdk17", "clean -f jetty-ee10", "maven3")
}
}
}
}
}
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")
mavenBuild("jdk17", "clean -f jetty-ee9", "maven3")
}
}
}
}
}
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")
mavenBuild("jdk17", "clean -f jetty-ee8", "maven3")
}
}
}
}
}
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")
mavenBuild("jdk17", "clean -pl :jetty-home", "maven3")
}
}
}
}
}
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")
mavenBuild("jdk17", "clean -f tests", "maven3")
}
}
}
}
}
/*
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/") {
steps {
container('jetty-build') {
timeout(time: 120, unit: 'MINUTES') {
dir("${env.WORKSPACE}/buildy") {
mavenBuild("jdk17", "clean install -rf :documentation", "maven3")
}
}
}
}
}
stage("Javadocs") {
steps {
container('jetty-build') {
timeout(time: 120, unit: 'MINUTES') {
dir("${env.WORKSPACE}/buildy") {
mavenBuild("jdk17", "clean install -DskipTests", "maven3")
mavenBuild("jdk17", "javadoc:javadoc", "maven3")
}
}
}
}
}
}
}
}
}
/**
* 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
*/
Jetty 9.4.x optimize parser warning from logs and add spotbug (#5735) * enable spotbugs in CI Signed-off-by: olivier lamy <oliver.lamy@gmail.com> record issues Signed-off-by: olivier lamy <oliver.lamy@gmail.com> use warning new generation Signed-off-by: olivier lamy <oliver.lamy@gmail.com> activate errorprone Signed-off-by: olivier lamy <oliver.lamy@gmail.com> fix Jenkinsfile Signed-off-by: olivier lamy <oliver.lamy@gmail.com> do not run spotbugs for jetty-runner as we do not want to fix all dependencies bugs :) Signed-off-by: olivier lamy <oliver.lamy@gmail.com> junit should allow empty results Signed-off-by: olivier lamy <oliver.lamy@gmail.com> maven console can be use only once... Signed-off-by: olivier lamy <oliver.lamy@gmail.com> one liner Signed-off-by: olivier lamy <oliver.lamy@gmail.com> recordissues only once Signed-off-by: olivier lamy <oliver.lamy@gmail.com> force id Signed-off-by: olivier lamy <oliver.lamy@gmail.com> aggregate results Signed-off-by: olivier lamy <oliver.lamy@gmail.com> configure a name for aggregated reports Signed-off-by: olivier lamy <oliver.lamy@gmail.com> mo more -T3 no need anymore of remote session test profile Signed-off-by: olivier lamy <oliver.lamy@gmail.com> I want to see what failing tests look like with new report. Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com> skip spotbugs for jetty-jmh Signed-off-by: olivier lamy <oliver.lamy@gmail.com> get rid of findbugs as we now have spotbugs Signed-off-by: olivier lamy <oliver.lamy@gmail.com> Revert "I want to see what failing tests look like with new report." This reverts commit df0d13e4c53d7461872e1f925ec06bd36e4a66c9. activate errorProne parser Signed-off-by: olivier lamy <oliver.lamy@gmail.com> make pmd quiet for CI Signed-off-by: olivier lamy <oliver.lamy@gmail.com> remove -fae flag and do not display transfer progress Signed-off-by: olivier lamy <oliver.lamy@gmail.com> try junitParser() to see what it does Signed-off-by: olivier lamy <oliver.lamy@gmail.com> junit parser is a bad idea... Signed-off-by: olivier lamy <oliver.lamy@gmail.com> increase timeout Signed-off-by: olivier lamy <oliver.lamy@gmail.com> no -T2 for javadoc Signed-off-by: olivier lamy <oliver.lamy@gmail.com> fix skip spotbugs and pmd verbose Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * remove -T options Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2020-12-10 20:47:26 -05:00
def mavenBuild(jdk, cmdline, mvnName) {
2022-06-29 18:11:49 -04:00
script {
Jetty 10.0.x surefire upgrade and no skip errors (#5438) * fix apacheds version Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * get some logs Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * more debug Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * testing surefire M5 Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * already part of the classpath Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * add slf4j-simple to get logs Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * execute full build Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * no need to add jmx module Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * use h2spec-reports Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * h2 spec tests are too flaky Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * debug Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * touch trigger build Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * not trim stacktrace per default and a bit more memory for test Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * disable embedded jmx test Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * nit Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * no junit files for javadoc Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * fix dependency version Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * fix missing dependency with surefire M5... Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * remove debug Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * fix some upperbound dependency Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * fail quickly Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
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')]) {
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"
Jetty 10.0.x surefire upgrade and no skip errors (#5438) * fix apacheds version Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * get some logs Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * more debug Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * testing surefire M5 Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * already part of the classpath Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * add slf4j-simple to get logs Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * execute full build Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * no need to add jmx module Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * use h2spec-reports Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * h2 spec tests are too flaky Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * debug Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * touch trigger build Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * not trim stacktrace per default and a bit more memory for test Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * disable embedded jmx test Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * nit Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * no junit files for javadoc Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * fix dependency version Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * fix missing dependency with surefire M5... Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * remove debug Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * fix some upperbound dependency Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * fail quickly Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2020-11-18 06:26:38 -05:00
}
}
Jetty 9.4.x not skipping tests failure and fix jaas test (#5255) * remove -Dmaven.test.failure.ignore=true Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * get JAASLdapLoginServiceTest working Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * increase memory Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * use only single thread to have more readable log in Jenkins Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * disable java8 Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * test only java8 Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * increase memory Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * try -T3 Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * restore jdk11/14 Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * try more memory Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * archive logs from Jenkins Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * archive logs from Jenkins Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * more memory Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * skip jacoco Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * test useManifestOnlyJar true Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * junit Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * useManifestOnlyJar false Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * debug maven surefire Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * very simple build to debug Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * try M5 Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * try not using withMaven Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * no debug surefire M4 Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * all jdk and M5 Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * enable jacoco only for java8 Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * reduce memory usage for test Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * avoid duplications of warnings parsing Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * fix my bad Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2020-09-10 23:11:04 -04:00
}
finally
{
junit testResults: '**/target/surefire-reports/*.xml,**/target/invoker-reports/TEST*.xml', allowEmptyResults: true, skipPublishingChecks: true
Jetty 10.0.x surefire upgrade and no skip errors (#5438) * fix apacheds version Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * get some logs Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * more debug Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * testing surefire M5 Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * already part of the classpath Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * add slf4j-simple to get logs Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * execute full build Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * no need to add jmx module Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * use h2spec-reports Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * h2 spec tests are too flaky Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * debug Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * touch trigger build Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * not trim stacktrace per default and a bit more memory for test Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * disable embedded jmx test Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * nit Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * no junit files for javadoc Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * fix dependency version Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * fix missing dependency with surefire M5... Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * remove debug Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * fix some upperbound dependency Signed-off-by: olivier lamy <oliver.lamy@gmail.com> * fail quickly Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2020-11-18 06:26:38 -05:00
}
2022-06-29 18:11:49 -04:00
}
}
2016-07-26 10:25:23 -04:00
// vim: et:ts=2:sw=2:ft=groovy