jetty.project/Jenkinsfile

115 lines
4.3 KiB
Plaintext
Raw Normal View History

#!groovy
pipeline {
agent any
// save some io during the build
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
options { durabilityHint('PERFORMANCE_OPTIMIZED') }
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 {
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("Build / Test - JDK11") {
agent { node { label 'linux' } }
steps {
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
container('jetty-build') {
timeout( time: 120, unit: 'MINUTES' ) {
mavenBuild( "jdk11", "-T3 clean install", "maven3",
[[parserName: 'Maven'], [parserName: 'Java']] )
// 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/http/spi/**' +
// test classes
',**/org/eclipse/jetty/tests/**' + ',**/org/eclipse/jetty/test/**',
execPattern: '**/target/jacoco.exec',
classPattern: '**/target/classes',
sourcePattern: '**/src/main/java'
}
}
}
}
stage("Build / Test - JDK15") {
agent { node { label 'linux' } }
steps {
container( 'jetty-build' ) {
timeout( time: 120, unit: 'MINUTES' ) {
mavenBuild( "jdk15", "clean install -T3 -Djacoco.skip=true -Djacoco.skip=true", "maven3",
[[parserName: 'Maven'], [parserName: 'Java']] )
}
}
}
}
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 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
def mavenBuild(jdk, cmdline, mvnName, consoleParsers) {
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 -s $GLOBAL_MVN_SETTINGS -DsettingsPath=$GLOBAL_MVN_SETTINGS -Pci -V -B -e -Djetty.testtracker.log=true $cmdline -Dunix.socket.tmp=" +
env.JENKINS_HOME
}
}
} finally {
junit testResults: '**/target/surefire-reports/*.xml,**/target/invoker-reports/TEST*.xml,**/h2spec-reports/*.xml', allowEmptyResults: true
if(consoleParsers!=null) {
warnings consoleParsers: consoleParsers
}
}
}
}
2016-07-26 10:25:23 -04:00
// vim: et:ts=2:sw=2:ft=groovy