You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by zr...@apache.org on 2018/07/02 11:41:59 UTC

[camel] branch master updated: Make sure to check Maven result in daily build

This is an automated email from the ASF dual-hosted git repository.

zregvart pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/master by this push:
     new f2fc967  Make sure to check Maven result in daily build
f2fc967 is described below

commit f2fc96756cc17126aa2c506234c2b1823614f9ea
Author: Zoran Regvart <zr...@apache.org>
AuthorDate: Mon Jul 2 13:41:51 2018 +0200

    Make sure to check Maven result in daily build
    
    In the daily build to run tests on JDK 9/10/11 we don't check for the
    result of the Maven invocation. This might lead to tests not being run
    due to a Maven dependency issue and the build outcome would be success.
    
    This gathers result codes from invoking Maven and fails the build if
    they do not end up being 0 for all 9/10/11 tests.
---
 Jenkinsfile.daily | 21 ++++++++++++++++++---
 1 file changed, 18 insertions(+), 3 deletions(-)

diff --git a/Jenkinsfile.daily b/Jenkinsfile.daily
index 7544fcd..f49f417 100644
--- a/Jenkinsfile.daily
+++ b/Jenkinsfile.daily
@@ -23,6 +23,8 @@ def BUILD_JDK_NAME = env.JDK_NAME ?: 'JDK 1.8 (latest)'
 
 def MAVEN_PARAMS = "-U -B -e -fae -V -Dmaven.repo.local=${LOCAL_REPOSITORY} -Dnoassembly -Dmaven.compiler.fork=true -Dsurefire.rerunFailingTestsCount=2"
 
+def jdk9_result, jdk10_result, jdk11_result
+
 pipeline {
 
     agent {
@@ -56,7 +58,9 @@ pipeline {
                 jdk 'JDK 1.9 (latest)'
             }
             steps {
-                sh script: "./mvnw $MAVEN_PARAMS -Dmaven.test.failure.ignore=true test", returnStatus: true
+                script {
+                    jdk9_result = sh script: "./mvnw $MAVEN_PARAMS -Dmaven.test.failure.ignore=true test", returnStatus: true
+                }
             }
             post {
                 always {
@@ -72,7 +76,9 @@ pipeline {
                 jdk 'JDK 10 (latest)'
             }
             steps {
-                sh script: "./mvnw $MAVEN_PARAMS -Dmaven.test.failure.ignore=true test", returnStatus: true
+                script {
+                    jdk10_result = sh script: "./mvnw $MAVEN_PARAMS -Dmaven.test.failure.ignore=true test", returnStatus: true
+                }
             }
             post {
                 always {
@@ -88,7 +94,9 @@ pipeline {
                 jdk 'JDK 11 (latest)'
             }
             steps {
-                sh script: "./mvnw $MAVEN_PARAMS -Dmaven.test.failure.ignore=true test", returnStatus: true
+                script {
+                    jdk11_result = sh script: "./mvnw $MAVEN_PARAMS -Dmaven.test.failure.ignore=true test", returnStatus: true
+                }
             }
             post {
                 always {
@@ -101,5 +109,12 @@ pipeline {
 
     }
 
+    post {
+        always {
+            script {
+                currentBuild.result = jdk9_result == 0 && jdk10_result == 0 && jdk11_result == 0 ? 'SUCCESS' : 'FAILURE'
+            }
+        }
+    }
 }