Skip to content

Commit

Permalink
Merge branch '3.0.x' into 4.0.x
Browse files Browse the repository at this point in the history
  • Loading branch information
olamy committed May 20, 2024
2 parents 87ee7b6 + b59f0df commit aedc4f5
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ pipeline {
options {
skipDefaultCheckout()
durabilityHint('PERFORMANCE_OPTIMIZED')
buildDiscarder logRotator( numToKeepStr: '60' )
buildDiscarder logRotator( numToKeepStr: '30' )
disableRestartFromStage()
}

Expand All @@ -18,7 +18,8 @@ pipeline {
steps {
timeout( time: 180, unit: 'MINUTES' ) {
checkout scm
mavenBuild( "jdk21", "clean install -Dmaven.test.failure.ignore=true -e javadoc:javadoc", "maven3", false)
mavenBuild( "jdk21", "clean install -Dmaven.test.failure.ignore=true ", "maven3", true)
mavenBuild( "jdk21", "clean javadoc:javadoc ", "maven3", false)
}
}
}
Expand All @@ -27,7 +28,7 @@ pipeline {
steps {
timeout( time: 180, unit: 'MINUTES' ) {
checkout scm
mavenBuild( "jdk17", "clean install -Dmaven.test.failure.ignore=true -e javadoc:javadoc", "maven3", true)
mavenBuild( "jdk17", "clean install -Dmaven.test.failure.ignore=true javadoc:javadoc -Djacoco.skip=true", "maven3", false)
}
}
}
Expand All @@ -36,27 +37,25 @@ pipeline {
}
}

def mavenBuild(jdk, cmdline, mvnName, skipJacoco) {
def mavenBuild(String jdk, String cmdline, String mvnName, boolean recordJacoco) {
script {
try {
withEnv(["JAVA_HOME=${ tool "$jdk" }",
"PATH+MAVEN=${ tool "$jdk" }/bin:${tool "$mvnName"}/bin",
"MAVEN_OPTS=-Xms3g -Xmx3g -Djava.awt.headless=true -client -XX:+UnlockDiagnosticVMOptions -XX:GCLockerRetryAllocationCount=100"]) {
configFileProvider(
[configFile(fileId: 'oss-settings.xml', variable: 'GLOBAL_MVN_SETTINGS')]) {
sh "mvn $cmdline -ntp -s $GLOBAL_MVN_SETTINGS -V -B -e -U $cmdline"
sh "mvn $cmdline -ntp -s $GLOBAL_MVN_SETTINGS -V -B -e -U"
}
}
}
finally
{
junit testResults: '**/target/surefire-reports/*.xml,**/target/invoker-reports/TEST*.xml', allowEmptyResults: true
if(!skipJacoco) {
// Collect the JaCoCo execution results.
jacoco inclusionPattern: '**/org/eclipse/jetty/reactive/**/*.class',
execPattern: '**/target/jacoco.exec',
classPattern: '**/target/classes',
sourcePattern: '**/src/main/java'
junit testResults: '**/target/surefire-reports/*.xml', allowEmptyResults: true
if(recordJacoco) {
// Collect the JaCoCo execution results.
recordCoverage id: "coverage", name: "Coverage", tools: [[parser: 'JACOCO', pattern: '**/jacoco/jacoco.xml']], sourceCodeRetention: 'MODIFIED',
sourceDirectories: [[path: 'src/main/java']]
}
}
}
Expand Down

0 comments on commit aedc4f5

Please sign in to comment.