From 9e8743788ddee71a7bf4e5d76782c75800c90159 Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Tue, 19 Jun 2018 09:24:02 +1000 Subject: [PATCH] no need of jacoco for other jdk btw jenkins ui do not display jdk label.. (#2673) Signed-off-by: olivier lamy --- Jenkinsfile | 57 ++++++++++++++++++++++++++++++++--------------------- 1 file changed, 34 insertions(+), 23 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index f5c4d1c29ec..639528cf8a0 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,5 +1,6 @@ #!groovy +// in case of change update method isMainBuild def jdks = ["jdk8","jdk9","jdk10","jdk11"] def oss = ["linux"] def builds = [:] @@ -101,31 +102,37 @@ def getFullBuild(jdk, os) { // withMaven doesn't label.. // Report failures in the jenkins UI junit testResults:'**/target/surefire-reports/TEST-*.xml,**/target/failsafe-reports/TEST-*.xml' - // Collect up the jacoco execution results - def jacocoExcludes = - // 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/spring/**" + - ",**/org/eclipse/jetty/http/spi/**" + - // test classes - ",**/org/eclipse/jetty/tests/**" + ",**/org/eclipse/jetty/test/**"; - step( [$class : 'JacocoPublisher', - inclusionPattern: '**/org/eclipse/jetty/**/*.class', - exclusionPattern: jacocoExcludes, - execPattern : '**/target/jacoco.exec', - classPattern : '**/target/classes', - sourcePattern : '**/src/main/java'] ) + consoleParsers = [[parserName: 'JavaDoc'], + [parserName: 'JavaC']]; + if (isMainBuild( jdk )) { + // Collect up the jacoco execution results + def jacocoExcludes = + // 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/spring/**" + + ",**/org/eclipse/jetty/http/spi/**" + + // test classes + ",**/org/eclipse/jetty/tests/**" + ",**/org/eclipse/jetty/test/**"; + step( [$class : 'JacocoPublisher', + inclusionPattern: '**/org/eclipse/jetty/**/*.class', + exclusionPattern: jacocoExcludes, + execPattern : '**/target/jacoco.exec', + classPattern : '**/target/classes', + sourcePattern : '**/src/main/java'] ) + consoleParsers = [[parserName: 'Maven'], + [parserName: 'JavaDoc'], + [parserName: 'JavaC']]; + } + // Report on Maven and Javadoc warnings step( [$class : 'WarningsPublisher', - consoleParsers: [[parserName: 'Maven'], - [parserName: 'JavaDoc'], - [parserName: 'JavaC']]] ) + consoleParsers: consoleParsers] ) } if(isUnstable()) { @@ -161,6 +168,10 @@ def getFullBuild(jdk, os) { } } +def isMainBuild(jdk) { + return jdk == "jdk8" +} + // True if this build is part of the "active" branches // for Jetty.