jetty.project/Jenkinsfile

125 lines
4.7 KiB
Plaintext
Raw Normal View History

#!groovy
pipeline {
agent any
// save some io during the build
options {
skipDefaultCheckout()
durabilityHint('PERFORMANCE_OPTIMIZED')
buildDiscarder logRotator( numToKeepStr: '60' )
}
stages {
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
stage("Parallel Stage") {
parallel {
stage("Build / Test - JDK17") {
agent { node { label 'linux' } }
steps {
container('jetty-build') {
timeout( time: 180, unit: 'MINUTES' ) {
checkout scm
mavenBuild( "jdk17", "clean install -Perrorprone", "maven3")
// 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/its/**' +
',**/org/eclipse/jetty/its/**' +
// 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/http/spi/**' +
// test classes
',**/org/eclipse/jetty/tests/**' +
',**/org/eclipse/jetty/test/**',
execPattern: '**/target/jacoco.exec',
classPattern: '**/target/classes',
sourcePattern: '**/src/main/java'
recordIssues id: "jdk17", name: "Static Analysis jdk17", aggregatingResults: true, enabledForFailure: true, tools: [mavenConsole(), java(), checkStyle(), errorProne(), spotBugs()]
}
}
}
}
stage("Build / Test - JDK11") {
agent { node { label 'linux' } }
steps {
container( 'jetty-build' ) {
timeout( time: 180, unit: 'MINUTES' ) {
checkout scm
mavenBuild( "jdk11", "clean install -Dspotbugs.skip=true -Djacoco.skip=true", "maven3")
recordIssues id: "jdk11", name: "Static Analysis jdk11", aggregatingResults: true, enabledForFailure: true, tools: [mavenConsole(), java(), checkStyle()]
}
}
}
}
2019-02-21 12:01:26 -05:00
}
}
}
post {
failure {
slackNotif()
}
unstable {
slackNotif()
}
fixed {
slackNotif()
}
}
}
def slackNotif() {
script {
try {
if ( env.BRANCH_NAME == 'jetty-10.0.x' || env.BRANCH_NAME == 'jetty-11.0.x') {
//BUILD_USER = currentBuild.rawBuild.getCause(Cause.UserIdCause).getUserId()
// by ${BUILD_USER}
COLOR_MAP = ['SUCCESS': 'good', 'FAILURE': 'danger', 'UNSTABLE': 'danger', 'ABORTED': 'danger']
slackSend channel: '#jenkins',
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
color: COLOR_MAP[currentBuild.currentResult],
message: "*${currentBuild.currentResult}:* Job ${env.JOB_NAME} build ${env.BUILD_NUMBER} - ${env.BUILD_URL}"
}
} catch (Exception e) {
e.printStackTrace()
echo "skip failure slack notification: " + e.getMessage()
}
}
}
/**
* 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) {
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
script {
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 --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
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
}
}
}
2016-07-26 10:25:23 -04:00
// vim: et:ts=2:sw=2:ft=groovy