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 357165a2fa33479a6bcbe72989111716fa3cf5e1 Author: Tibor17 <[email protected]> AuthorDate: Tue Mar 27 17:12:46 2018 +0200 permanent issue on every Windows & JDK10 build INFRA-16191 --- Jenkinsfile | 84 +++++++++++++++++++++++++++++++++---------------------------- 1 file changed, 45 insertions(+), 39 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index c33159c..f07b5f1 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] : [10] final def options = ['-e', '-V', '-B', '-nsu', '-P', 'run-its'] final def goals = ['clean', 'install', 'jacoco:report'] @@ -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 [email protected].
