maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tibordig...@apache.org
Subject [maven-surefire] 01/01: permanent issue on every Windows & JDK10 build INFRA-16191
Date Wed, 28 Mar 2018 20:47:25 GMT
This is an automated email from the ASF dual-hosted git repository.

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

commit 19eef775e4fd7536d383e209a7e5a058f0b3c40d
Author: Tibor17 <tibordigana@apache.org>
AuthorDate: Tue Mar 27 17:12:46 2018 +0200

    permanent issue on every Windows & JDK10 build INFRA-16191
---
 Jenkinsfile | 86 +++++++++++++++++++++++++++++++++----------------------------
 1 file changed, 46 insertions(+), 40 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index c33159c..0c6ab4a 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -21,14 +21,19 @@
 
 properties(
     [
-        buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '0', daysToKeepStr:
env.BRANCH_NAME == 'master' ? '30' : '7', numToKeepStr: '5')),
-        disableConcurrentBuilds()
+        buildDiscarder(logRotator(artifactDaysToKeepStr: env.BRANCH_NAME == 'master' ? '30'
: '7',
+                                  artifactNumToKeepStr: '10',
+                                  daysToKeepStr: env.BRANCH_NAME == 'master' ? '30' : '7',
+                                  numToKeepStr: '10')
+        ),
+        disableConcurrentBuilds(),
+        timeout(time: 12, unit: 'HOURS')
     ]
 )
 
 final def oses = ['linux', 'windows']
-final def mavens = ['3.2.x', '3.3.x', '3.5.x'] // env.BRANCH_NAME == 'master' ? ['3.2.x',
'3.3.x', '3.5.x'] : ['3.2.x', '3.5.x']
-final def jdks = [7, 8, 9, 10] // env.BRANCH_NAME == 'master' ? [7, 8, 9, 10] : [7, 10]
+final def mavens = env.BRANCH_NAME == 'master' ? ['3.2.x', '3.3.x', '3.5.x'] : ['3.5.x']
+final def jdks = env.BRANCH_NAME == 'master' ? [7, 8, 9, 10] : [7, 10]
 
 final def options = ['-e', '-V', '-B', '-nsu', '-P', 'run-its']
 final def goals = ['clean', 'install', 'jacoco:report']
@@ -61,7 +66,7 @@ oses.eachWithIndex { os, indexOfOs ->
                 node(label) {
                     timestamps {
                         //https://github.com/jacoco/jacoco/issues/629
-                        def boolean makeReports = os == 'linux' && indexOfMaven ==
mavens.size() - 1 && jdk == 9
+                        def boolean makeReports = os == 'linux' && indexOfMaven ==
mavens.size() - 1 && jdk == 10
                         def failsafeItPort = 8000 + 100 * indexOfMaven + 10 * indexOfJdk
                         def allOptions = options + ["-Dfailsafe-integration-test-port=${failsafeItPort}",
"-Dfailsafe-integration-test-stop-port=${1 + failsafeItPort}"]
                         buildProcess(stageKey, jdkName, jdkTestName, mvnName, goals, allOptions,
mavenOpts, makeReports)
@@ -72,52 +77,53 @@ oses.eachWithIndex { os, indexOfOs ->
     }
 }
 
-timeout(time: 10, unit: 'HOURS') {
-    try {
-        parallel(stages)
-        // JENKINS-34376 seems to make it hard to detect the aborted builds
-    } catch (org.jenkinsci.plugins.workflow.steps.FlowInterruptedException e) {
-        // this ambiguous condition means a user probably aborted
-        if (e.causes.size() == 0) {
-            currentBuild.result = "ABORTED"
-        } else {
-            currentBuild.result = "FAILURE"
-        }
-        throw e
-    } catch (hudson.AbortException e) {
-        // this ambiguous condition means during a shell step, user probably aborted
-        if (e.getMessage().contains('script returned exit code 143')) {
-            currentBuild.result = "ABORTED"
-        } else {
-            currentBuild.result = "FAILURE"
-        }
-        throw e
-    } catch (InterruptedException e) {
+try {
+    parallel(stages)
+    // JENKINS-34376 seems to make it hard to detect the aborted builds
+} catch (org.jenkinsci.plugins.workflow.steps.FlowInterruptedException e) {
+    println "org.jenkinsci.plugins.workflow.steps.FlowInterruptedException: ${e}"
+    // this ambiguous condition means a user probably aborted
+    if (e.causes.size() == 0) {
         currentBuild.result = "ABORTED"
-        throw e
-    } catch (Throwable e) {
+    } else {
         currentBuild.result = "FAILURE"
-        throw e
-    } finally {
-        stage("notifications") {
-            //jenkinsNotify()
-        }
+    }
+    throw e
+} catch (hudson.AbortException e) {
+    println "hudson.AbortException: ${e}"
+    // this ambiguous condition means during a shell step, user probably aborted
+    if (e.getMessage().contains('script returned exit code 143')) {
+        currentBuild.result = "ABORTED"
+    } else {
+        currentBuild.result = "FAILURE"
+    }
+    throw e
+} catch (InterruptedException e) {
+    println "InterruptedException: ${e}"
+    currentBuild.result = "ABORTED"
+    throw e
+} catch (Throwable e) {
+    println "Throwable: ${e}"
+    currentBuild.result = "FAILURE"
+    throw e
+} finally {
+    stage("notifications") {
+        //jenkinsNotify()
     }
 }
 
 def buildProcess(String stageKey, String jdkName, String jdkTestName, String mvnName, goals,
options, mavenOpts, boolean makeReports) {
     cleanWs()
     try {
+        def mvnLocalRepoDir = null
         if (isUnix()) {
             sh 'mkdir -p .m2'
+            mvnLocalRepoDir = "${pwd()}/.m2"
         } else {
             bat 'mkdir .m2'
+            mvnLocalRepoDir = "${pwd()}\\.m2"
         }
 
-        def mvnLocalRepoDir = null
-        dir('.m2') {
-            mvnLocalRepoDir = "${pwd()}"
-        }
         println "Maven Local Repository = ${mvnLocalRepoDir}."
         assert mvnLocalRepoDir != null : 'Local Maven Repository is undefined.'
 
@@ -174,14 +180,14 @@ def buildProcess(String stageKey, String jdkName, String jdkTestName,
String mvn
             }
 
             if (fileExists('maven-failsafe-plugin/target/it')) {
-                zip(zipFile: "it--maven-failsafe-plugin--${stageKey}.zip", dir: 'maven-failsafe-plugin/target/it',
archive: true)
+                zip(zipFile: "maven-failsafe-plugin--${stageKey}.zip", dir: 'maven-failsafe-plugin/target/it',
archive: true)
             }
 
             if (fileExists('surefire-its/target')) {
-                zip(zipFile: "it--surefire-its--${stageKey}.zip", dir: 'surefire-its/target',
archive: true)
+                zip(zipFile: "surefire-its--${stageKey}.zip", dir: 'surefire-its/target',
archive: true)
             }
 
-            archiveArtifacts(artifacts: '*.zip', allowEmptyArchive: true, onlyIfSuccessful:
false)
+            archiveArtifacts(artifacts: "*--${stageKey}.zip", allowEmptyArchive: true, onlyIfSuccessful:
false)
         }
 
         stage("cleanup ${stageKey}") {

-- 
To stop receiving notification emails like this one, please contact
tibordigana@apache.org.

Mime
View raw message