maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tibordig...@apache.org
Subject maven-surefire git commit: [SUREFIRE-1472] Multibranch Pipeline supports JDK 7-10 Maven 3.2-3.5 Linux Windows [Forced Update!]
Date Tue, 06 Feb 2018 05:10:10 GMT
Repository: maven-surefire
Updated Branches:
  refs/heads/SUREFIRE-1463 7b32fd26e -> 8cdd07b74 (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/8cdd07b7
Tree: http://git-wip-us.apache.org/repos/asf/maven-surefire/tree/8cdd07b7
Diff: http://git-wip-us.apache.org/repos/asf/maven-surefire/diff/8cdd07b7

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

----------------------------------------------------------------------
 Jenkinsfile | 148 ++++++++++++++++++++++++++++---------------------------
 pom.xml     |   2 +
 2 files changed, 77 insertions(+), 73 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/8cdd07b7/Jenkinsfile
----------------------------------------------------------------------
diff --git a/Jenkinsfile b/Jenkinsfile
index c080713..03d6a80 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -26,7 +26,7 @@ properties(
     ]
 )
 
-def oses = ['windows']  // ['linux', 'windows']
+def oses = ['linux']  // ['linux', 'windows']
 def mavens = env.BRANCH_NAME == 'master' ? ['3.2.x', '3.3.x', '3.5.x'] : ['3.5.x']
 def jdks = ['9'] // env.BRANCH_NAME == 'master' ? ['7', '8', '9', '10'] : ['10']
 
@@ -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/8cdd07b7/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index f5af360..f4c8df0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -585,6 +585,8 @@
                   <exclude>src/main/resources/META-INF/services/org.apache.maven.surefire.providerapi.SurefireProvider
                   </exclude>
                   <exclude>DEPENDENCIES</exclude>
+                  <exclude>.m2/**</exclude>
+                  <exclude>.m2</exclude>
                 </excludes>
               </configuration>
             </execution>


Mime
View raw message