You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ti...@apache.org on 2019/01/24 00:25:42 UTC

[maven-surefire] branch jenkins-error updated: investigate only Windows, archive ITs

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

tibordigana pushed a commit to branch jenkins-error
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git


The following commit(s) were added to refs/heads/jenkins-error by this push:
     new c63fd16  investigate only Windows, archive ITs
c63fd16 is described below

commit c63fd161e6989f0fc348b553ee5ced4398c9f741
Author: tibordigana <ti...@apache.org>
AuthorDate: Thu Jan 24 01:25:26 2019 +0100

    investigate only Windows, archive ITs
---
 Jenkinsfile | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index 2947ef8..58ac56e 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -56,7 +56,7 @@ oses.eachWithIndex { osMapping, indexOfOs ->
 
             if (label == null || jdkTestName == null || mvnName == null) {
                 println "Skipping ${stageKey} as unsupported by Jenkins Environment."
-                return;
+                return
             }
 
             println "${stageKey}  ==>  Label: ${label}, JDK: ${jdkTestName}, Maven: ${mvnName}."
@@ -118,7 +118,7 @@ timeout(time: 12, unit: 'HOURS') {
 def buildProcess(String stageKey, String jdkName, String jdkTestName, String mvnName, goals, options, mavenOpts, boolean makeReports) {
     cleanWs()
     try {
-        def mvnLocalRepoDir = null
+        def mvnLocalRepoDir
         if (isUnix()) {
             sh 'mkdir -p .m2'
             mvnLocalRepoDir = "${pwd()}/.m2"
@@ -164,6 +164,18 @@ def buildProcess(String stageKey, String jdkName, String jdkTestName, String mvn
             }
         }
     } finally {
+
+        if (currentBuild.result != null && currentBuild.result != 'SUCCESS') {
+            if (fileExists('maven-failsafe-plugin/target/it')) {
+                zip(zipFile: "maven-failsafe-plugin--${stageKey}.zip", dir: 'maven-failsafe-plugin/target/it', archive: true)
+            }
+
+            if (fileExists('surefire-its/target')) {
+                zip(zipFile: "surefire-its--${stageKey}.zip", dir: 'surefire-its/target', archive: true)
+            }
+
+            archiveArtifacts(artifacts: "*--${stageKey}.zip", allowEmptyArchive: true, onlyIfSuccessful: false)
+        }
         // clean up after ourselves to reduce disk space
         cleanWs()
     }