Repository: maven-surefire
Updated Branches:
  refs/heads/SUREFIRE-1463 3fad01193 -> a43e43a7c (forced update)


[SUREFIRE-1472] Multibranch Pipeline supports JDK 7-10 Maven 3.2-3.5 Linux 
Windows


Project: http://git-wip-us.apache.org/repos/asf/maven-surefire/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven-surefire/commit/a43e43a7
Tree: http://git-wip-us.apache.org/repos/asf/maven-surefire/tree/a43e43a7
Diff: http://git-wip-us.apache.org/repos/asf/maven-surefire/diff/a43e43a7

Branch: refs/heads/SUREFIRE-1463
Commit: a43e43a7c12a1a0132b8f1857e8f7e40f7311610
Parents: 09f0eef
Author: Tibor17 <tibordig...@apache.org>
Authored: Tue Feb 6 05:30:00 2018 +0100
Committer: Tibor17 <tibordig...@apache.org>
Committed: Tue Feb 6 05:42:59 2018 +0100

----------------------------------------------------------------------
 Jenkinsfile | 146 ++++++++++++++++++++++++++++---------------------------
 pom.xml     |   1 +
 2 files changed, 75 insertions(+), 72 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/a43e43a7/Jenkinsfile
----------------------------------------------------------------------
diff --git a/Jenkinsfile b/Jenkinsfile
index c080713..25f20b6 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -64,43 +64,47 @@ oses.eachWithIndex { os, indexOfOs ->
                         try {
                             println "Basedir = ${pwd()}."
 
-                            def mvnLocalRepoDir
+                            def mvnLocalRepoDir = null
 
-                            dir('.repository') {
+                            dir('.m2') {
                                 mvnLocalRepoDir = "${pwd()}"
                             }
 
                             println "Maven Local Repository = 
${mvnLocalRepoDir}."
+                            assert mvnLocalRepoDir != null : 'Local Maven 
Repository is undefined.'
 
-                            dir('build') {
-                                stage("checkout ${stageKey}") {
-                                    checkout scm
-                                }
+                            stage("checkout ${stageKey}") {
+                                checkout scm
+                            }
+
+                            def jdkTestHome = 
resolveToolNameToJavaPath(jdkTestName, mvnName)
+                            def properties = ["\"-Djdk.home=${jdkTestHome}\"", 
"-Djacoco.skip=true"]
+                            println("Setting JDK for testing ${properties[0]}")
 
-                                def jdkTestHome = 
resolveToolNameToJavaPath(jdkTestName, mvnName)
-                                def properties = 
["\"-Djdk.home=${jdkTestHome}\"", "-Djacoco.skip=true"]
-                                println("Setting JDK for testing 
${properties[0]}")
-
-                                stage("build ${stageKey}") {
-                                    withMaven(jdk: jdkName, maven: mvnName,
-                                        mavenLocalRepo: mvnLocalRepoDir, 
mavenOpts: '-Xmx512m',
-                                        options: [
-                                            artifactsPublisher(disabled: true),
-                                    ]) {
-                                        def script = cmd + options + goals + 
properties
-                                        bat script.join(' ')
-                                    }
+                            stage("build ${stageKey}") {
+                                withMaven(jdk: jdkName, maven: mvnName,
+                                    mavenLocalRepo: mvnLocalRepoDir, 
mavenOpts: '-Xmx512m',
+                                    options: [
+                                            openTasksPublisher(disabled: true),
+                                            junitPublisher(disabled: true),
+                                            artifactsPublisher(disabled: true)
+                                ]) {
+                                    def script = cmd + options + goals + 
properties
+                                    bat script.join(' ')
                                 }
+                            }
 
-                                def propertiesITs = properties
+                            def propertiesITs = properties
 
-                                stage("build-failsafe-it ${stageKey}") {
+                            stage("build-failsafe-it ${stageKey}") {
 //                                    lock('maven-surefire-its') {
 //                                        timeout(time: 15, unit: 'MINUTES') {
 //                                            withMaven(jdk: jdkName, maven: 
mvnName,
 //                                                mavenLocalRepo: 
mvnLocalRepoDir, mavenOpts: '-Xmx512m',
 //                                                options: [
 //                                                    invokerPublisher(),
+//                                                    
openTasksPublisher(disabled: true),
+//                                                    junitPublisher(disabled: 
true),
 //                                                    
artifactsPublisher(disabled: true)
 //                                            ]) {
 //                                                def script = cmd + 
optionsITs + goalsITs + propertiesITs
@@ -108,19 +112,19 @@ oses.eachWithIndex { os, indexOfOs ->
 //                                            }
 //                                        }
 //                                    }
-                                }
                             }
                         } finally {
+                            println(readFile('target/rat.txt'))
 //                            Wait for INFRA installation of Pipeline Utils, 
use fileExists()
-//                            if 
(fileExists('build/maven-failsafe-plugin/target/it') {
-//                                zip(zipFile: 
"it--maven-failsafe-plugin--${stageKey}.zip", dir: 
'build/maven-failsafe-plugin/target/it', archive: true)
+//                            if 
(fileExists('maven-failsafe-plugin/target/it')) {
+//                                zip(zipFile: 
"it--maven-failsafe-plugin--${stageKey}.zip", dir: 
'maven-failsafe-plugin/target/it', archive: true)
 //                            }
 //
-//                            if (fileExists('build/surefire-its/target') {
-//                                zip(zipFile: 
"it--surefire-its--${stageKey}.zip", dir: 'build/surefire-its/target', archive: 
true)
+//                            if (fileExists('surefire-its/target')) {
+//                                zip(zipFile: 
"it--surefire-its--${stageKey}.zip", dir: 'surefire-its/target', archive: true)
 //                            }
 
-//                            archiveArtifacts(artifacts: 
'build/surefire-its/target/**/log.txt', allowEmptyArchive: true, fingerprint: 
true, onlyIfSuccessful: false)
+//                            archiveArtifacts(artifacts: 
'surefire-its/target/**/log.txt', allowEmptyArchive: true, fingerprint: true, 
onlyIfSuccessful: false)
 
                             stage("cleanup ${stageKey}") {
                                 // clean up after ourselves to reduce disk 
space
@@ -133,56 +137,54 @@ oses.eachWithIndex { os, indexOfOs ->
                         try {
                             println "Basedir = ${pwd()}."
 
-                            def mvnLocalRepoDir
+                            def mvnLocalRepoDir = null
 
-                            dir('.repository') {
+                            dir('.m2') {
                                 mvnLocalRepoDir = "${pwd()}"
                             }
 
                             println "Maven Local Repository = 
${mvnLocalRepoDir}."
+                            assert mvnLocalRepoDir != null : 'Local Maven 
Repository is undefined.'
 
-                            dir('build') {
-                                stage("checkout ${stageKey}") {
-                                    checkout scm
-                                }
+                            stage("checkout ${stageKey}") {
+                                checkout scm
+                            }
 
-                                def jdkTestHome = 
resolveToolNameToJavaPath(jdkTestName, mvnName)
-                                //https://github.com/jacoco/jacoco/issues/629
-                                def skipPlugins = jdk != '9'
-                                def properties = 
["\"-Djdk.home=${jdkTestHome}\"", "-Djacoco.skip=${skipPlugins}"]
-                                println("Setting JDK for testing 
${properties[0]}")
+                            def jdkTestHome = 
resolveToolNameToJavaPath(jdkTestName, mvnName)
+                            //https://github.com/jacoco/jacoco/issues/629
+                            def skipPlugins = jdk != '9'
+                            def properties = ["\"-Djdk.home=${jdkTestHome}\"", 
"-Djacoco.skip=${skipPlugins}"]
+                            println("Setting JDK for testing ${properties[0]}")
 
-                                stage("build ${stageKey}") {
-                                    withMaven(jdk: jdkName, maven: mvnName,
-                                        mavenLocalRepo: mvnLocalRepoDir, 
mavenOpts: '-Xmx1g',
-                                        options: [
+                            stage("build ${stageKey}") {
+                                withMaven(jdk: jdkName, maven: mvnName,
+                                    mavenLocalRepo: mvnLocalRepoDir, 
mavenOpts: '-Xmx1g',
+                                    options: [
                                             findbugsPublisher(disabled: 
skipPlugins),
                                             openTasksPublisher(disabled: 
skipPlugins, ignoreCase: true,
-                                                               pattern: 
sourcesPatternCsv(),
-                                                               low: 
tasksViolationLow(),
-                                                               normal: 
tasksViolationNormal(),
-                                                               high: 
tasksViolationHigh()),
+                                                    pattern: 
sourcesPatternCsv(),
+                                                    low: tasksViolationLow(),
+                                                    normal: 
tasksViolationNormal(),
+                                                    high: 
tasksViolationHigh()),
+                                            junitPublisher(disabled: true),
                                             artifactsPublisher(disabled: true)
-                                    ]) {
-                                        def script = cmd + options + goals + 
properties
-                                        sh script.join(' ')
-                                    }
+                                ]) {
+                                    def script = cmd + options + goals + 
properties
+                                    sh script.join(' ')
                                 }
+                            }
 
-                                def propertiesITs = [properties[0], 
'-Djacoco.skip=true']
+                            def propertiesITs = [properties[0], 
'-Djacoco.skip=true']
 
-                                stage("build-failsafe-it ${stageKey}") {
+                            stage("build-failsafe-it ${stageKey}") {
 //                                    lock('maven-surefire-its') {
 //                                        timeout(time: 15, unit: 'MINUTES') {
 //                                            withMaven(jdk: jdkName, maven: 
mvnName,
 //                                                mavenLocalRepo: 
mvnLocalRepoDir, mavenOpts: '-Xmx1g',
 //                                                options: [
 //                                                    invokerPublisher(),
-//                                                    
openTasksPublisher(disabled: true, ignoreCase: true,
-//                                                                       
pattern: sourcesPatternCsv(),
-//                                                                       low: 
tasksViolationLow(),
-//                                                                       
normal: tasksViolationNormal(),
-//                                                                       high: 
tasksViolationHigh()),
+//                                                    
openTasksPublisher(disabled: true),
+//                                                    junitPublisher(disabled: 
true),
 //                                                    
artifactsPublisher(disabled: true)
 //                                            ]) {
 //                                                def script = cmd + 
optionsITs + goalsITs + propertiesITs
@@ -190,7 +192,6 @@ oses.eachWithIndex { os, indexOfOs ->
 //                                            }
 //                                        }
 //                                    }
-                                }
                             }
                         } finally {
                             if (indexOfMaven == mavens.size() - 1 && jdk == 
'9') {
@@ -210,17 +211,18 @@ oses.eachWithIndex { os, indexOfOs ->
                             }
 
 //                            Wait for INFRA installation of Pipeline Utils, 
use fileExists()
-//                            if 
(fileExists('build/maven-failsafe-plugin/target/it') {
-//                                zip(zipFile: 
"it--maven-failsafe-plugin--${stageKey}.zip", dir: 
'build/maven-failsafe-plugin/target/it', archive: true)
+//                            if 
(fileExists('maven-failsafe-plugin/target/it')) {
+//                                zip(zipFile: 
"it--maven-failsafe-plugin--${stageKey}.zip", dir: 
'maven-failsafe-plugin/target/it', archive: true)
 //                            }
 //
-//                            if (fileExists('build/surefire-its/target') {
-//                                zip(zipFile: 
"it--surefire-its--${stageKey}.zip", dir: 'build/surefire-its/target', archive: 
true)
-//                            }
+                            if (fileExists('surefire-its/target')) {
+//                                zip(zipFile: 
"it--surefire-its--${stageKey}.zip", dir: 'surefire-its/target', archive: true)
+                                sh 'tar czvf it2.tgz surefire-its/target'
+                            }
 //
-//                            sh 'tar czvf it1.tgz 
build/maven-failsafe-plugin/target/it'
-//                            sh 'tar czvf it2.tgz build/surefire-its/target'
-//                            archiveArtifacts(artifacts: '**/*.tgz', 
allowEmptyArchive: true, fingerprint: true, onlyIfSuccessful: false)
+//                            sh 'tar czvf it1.tgz 
maven-failsafe-plugin/target/it'
+//                            sh 'tar czvf it2.tgz surefire-its/target'
+                            archiveArtifacts(artifacts: '**/*.tgz', 
allowEmptyArchive: true, fingerprint: true, onlyIfSuccessful: false)
 //                            archiveArtifacts(artifacts: '*.tgz', 
allowEmptyArchive: true, fingerprint: true, onlyIfSuccessful: false)
 
                             stage("cleanup ${stageKey}") {
@@ -295,7 +297,7 @@ def resolveToolNameToJavaPath(jdkToolName, mvnName) {
 }
 
 @NonCPS
-def sourcesPatternCsv() {
+static def sourcesPatternCsv() {
     return '**/maven-failsafe-plugin/src/main/java,' +
             '**/maven-surefire-common/src/main/java,' +
             '**/maven-surefire-plugin/src/main/java,' +
@@ -310,7 +312,7 @@ def sourcesPatternCsv() {
 }
 
 @NonCPS
-def classPatternCsv() {
+static def classPatternCsv() {
     return '**/maven-failsafe-plugin/target/classes,' +
             '**/maven-surefire-common/target/classes,' +
             '**/maven-surefire-plugin/target/classes,' +
@@ -325,23 +327,23 @@ def classPatternCsv() {
 }
 
 @NonCPS
-def tasksViolationLow() {
+static def tasksViolationLow() {
     return '@SuppressWarnings'
 }
 
 @NonCPS
-def tasksViolationNormal() {
+static def tasksViolationNormal() {
     return 'TODO,FIXME,@deprecated'
 }
 
 @NonCPS
-def tasksViolationHigh() {
+static def tasksViolationHigh() {
     return 'finalize(),Locale.setDefault,TimeZone.setDefault,\
 
System.out,System.err,System.setOut,System.setErr,System.setIn,System.exit,System.gc,System.runFinalization,System.load'
 }
 
 @NonCPS
-def testReportsPatternCsv() {
+static def testReportsPatternCsv() {
     return '**/maven-failsafe-plugin/target/surefire-reports/*.xml,' +
             '**/maven-surefire-common/target/surefire-reports/*.xml,' +
             '**/maven-surefire-plugin/target/surefire-reports/*.xml,' +

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/a43e43a7/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index f5af360..22a98bc 100644
--- a/pom.xml
+++ b/pom.xml
@@ -585,6 +585,7 @@
                   
<exclude>src/main/resources/META-INF/services/org.apache.maven.surefire.providerapi.SurefireProvider
                   </exclude>
                   <exclude>DEPENDENCIES</exclude>
+                  <exclude>.m2</exclude>
                 </excludes>
               </configuration>
             </execution>

Reply via email to