This is an automated email from the ASF dual-hosted git repository.

deki pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cxf.git


The following commit(s) were added to refs/heads/master by this push:
     new ccb5935  Jenkins: use matrix
ccb5935 is described below

commit ccb5935a6884e8691448da2b65f3cce66b94cc34
Author: Dennis Kieselhorst <[email protected]>
AuthorDate: Mon Aug 3 13:54:29 2020 +0200

    Jenkins: use matrix
---
 Jenkinsfile | 81 +++++++++++++++++++++++--------------------------------------
 1 file changed, 30 insertions(+), 51 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index a59f5c9..2e8a210 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -26,62 +26,41 @@ pipeline {
       }
     }
     stage('Build') {
-      parallel {
-        stage('JDK 11') {
-          agent {
-            label 'ubuntu'
-          }
-          tools {
-            jdk 'JDK 11 (latest)'
-            maven 'Maven (latest)'
-          }
-          environment {
-            MAVEN_OPTS = "-Xmx1024m"
+      matrix {
+        agent {
+          label 'ubuntu'
+        }
+        axes {
+          axis {
+            name 'JDK'
+            values 'JDK 8', 'JDK 11'
           }
-          stages {
-            stage('Build & Test JDK 11') {
-              steps {
-                sh 'mvn -B clean install'
-                // step([$class: 'JiraIssueUpdater', issueSelector: [$class: 
'DefaultIssueSelector'], scm: scm])
-              }
-              post {
-                always {
-                  junit(testResults: '**/surefire-reports/*.xml', 
allowEmptyResults: true)
-                  junit(testResults: '**/failsafe-reports/*.xml', 
allowEmptyResults: true)
-                }
-              }
+        }
+        stages {
+          stage('${JDK}') {
+            agent {
+              label 'ubuntu'
             }
-          }
-          post {
-            always {
-              cleanWs deleteDirs: true, patterns: [[pattern: '**/target/**', 
type: 'INCLUDE']]
+            tools {
+              jdk '${JDK} (latest)'
+              maven 'Maven (latest)'
             }
-          }
-        }
-        stage('JDK 8') {
-          agent {
-            label 'ubuntu'
-          }
-          tools {
-            jdk 'JDK 1.8 (latest)'
-            maven 'Maven (latest)'
-          }
-          environment {
-            MAVEN_OPTS = "-Xmx1024m"
-          }
-          stages {
-            stage('Build & Test JDK 8') {
-              steps {
-                sh 'mvn -B clean install'
-                // step([$class: 'JiraIssueUpdater', issueSelector: [$class: 
'DefaultIssueSelector'], scm: scm])
-              }
-              post {
-                always {
-                  junit(testResults: '**/surefire-reports/*.xml', 
allowEmptyResults: true)
-                  junit(testResults: '**/failsafe-reports/*.xml', 
allowEmptyResults: true)
+            environment {
+              MAVEN_OPTS = "-Xmx1024m"
+            }
+            stages {
+              stage('Build & Test ${JDK}') {
+                steps {
+                  sh 'mvn -B clean install'
+                  // step([$class: 'JiraIssueUpdater', issueSelector: [$class: 
'DefaultIssueSelector'], scm: scm])
+                }
+                post {
+                  always {
+                    junit(testResults: '**/surefire-reports/*.xml', 
allowEmptyResults: true)
+                    junit(testResults: '**/failsafe-reports/*.xml', 
allowEmptyResults: true)
+                  }
                 }
               }
-            }
             /* stage('Build Source & JavaDoc') {
               when {
                 branch 'master'

Reply via email to