Repository: maven
Updated Branches:
  refs/heads/MNG-6364 [created] d5dd8a26c


[MNG-6364] - Enhanced Jenkinsfile to Build Core with JDK 9


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

Branch: refs/heads/MNG-6364
Commit: d5dd8a26c1758769dd9f854f1d9532037db5fdbc
Parents: 8f619ac
Author: Karl Heinz Marbaise <khmarba...@apache.org>
Authored: Sun Feb 18 15:15:47 2018 +0100
Committer: Karl Heinz Marbaise <khmarba...@apache.org>
Committed: Sun Feb 18 15:15:47 2018 +0100

----------------------------------------------------------------------
 Jenkinsfile | 43 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/d5dd8a26/Jenkinsfile
----------------------------------------------------------------------
diff --git a/Jenkinsfile b/Jenkinsfile
index 697e6eb..0729689 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -98,6 +98,25 @@ parallel linuxJava7:{
                 }
             }
         }
+    },linuxJava9: {
+        node(jenkinsEnv.labelForOS('linux')) {
+            stage ('Linux Java 9') {
+                String jdkName = jenkinsEnv.jdkFromVersion('linux', '9')
+                String mvnName = jenkinsEnv.mvnFromVersion('linux', buildMvn)
+                dir('test') {
+                    def WORK_DIR=pwd()
+                    checkout tests
+                    sh "rm -rvf $WORK_DIR/apache-maven-dist.zip 
$WORK_DIR/it-local-repo"
+                    unstash 'dist'
+                    withMaven(jdk: jdkName, maven: mvnName, 
mavenLocalRepo:"${WORK_DIR}/it-local-repo", options:[
+                        junitPublisher(ignoreAttachments: false)
+                    ]) {
+                        sh "mvn clean install -P$CORE_IT_PROFILES -B -U -V 
-Dmaven.test.failure.ignore=true -DmavenDistro=$WORK_DIR/apache-maven-dist.zip"
+                    }
+                    deleteDir() // clean up after ourselves to reduce disk 
space
+                }
+            }
+        }
     }, winJava7: {
         node(jenkinsEnv.labelForOS('windows')) {
             stage ('Windows Java 7') {
@@ -146,6 +165,30 @@ parallel linuxJava7:{
                 }
             }
         }
+    }, winJava9: {
+        node(jenkinsEnv.labelForOS('windows')) {
+            stage ('Windows Java 9') {
+                String jdkName = jenkinsEnv.jdkFromVersion('windows', '9')
+                String mvnName = jenkinsEnv.mvnFromVersion('windows', buildMvn)
+
+                // need a short path or we hit 256 character limit for paths
+                // using EXECUTOR_NUMBER guarantees that concurrent builds on 
same agent
+                // will not trample each other
+                dir("/mvn-it-${EXECUTOR_NUMBER}.tmp") {
+                    def WORK_DIR=pwd()
+                    checkout tests
+                    bat "if exist it-local-repo rmdir /s /q it-local-repo"
+                    bat "if exist apache-maven-dist.zip del /q 
apache-maven-dist.zip"
+                    unstash 'dist'
+                    withMaven(jdk: jdkName, maven: mvnName, 
mavenLocalRepo:"${WORK_DIR}/it-local-repo", options:[
+                        junitPublisher(ignoreAttachments: false)
+                    ]) {
+                        bat "mvn clean install -P$CORE_IT_PROFILES -B -U -V 
-Dmaven.test.failure.ignore=true -DmavenDistro=$WORK_DIR/apache-maven-dist.zip"
+                    }
+                    deleteDir() // clean up after ourselves to reduce disk 
space
+                }
+            }
+        }
     }
 
 // JENKINS-34376 seems to make it hard to detect the aborted builds

Reply via email to