You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by lu...@apache.org on 2019/08/30 06:57:33 UTC

[struts] branch docker-build updated: Splits build into stages

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

lukaszlenart pushed a commit to branch docker-build
in repository https://gitbox.apache.org/repos/asf/struts.git


The following commit(s) were added to refs/heads/docker-build by this push:
     new 823fcc5  Splits build into stages
823fcc5 is described below

commit 823fcc51288fa9379769967d924476961c295ba8
Author: Lukasz Lenart <lu...@apache.org>
AuthorDate: Fri Aug 30 08:57:25 2019 +0200

    Splits build into stages
---
 Jenkinsfile | 31 ++++++++++++++++++++++---------
 1 file changed, 22 insertions(+), 9 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index 3ce108e..b54c155 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -4,6 +4,10 @@ pipeline {
     node {
       label 'ubuntu'
     }
+    docker {
+      image 'maven:3-jdk-8-slim'
+      args '-v $HOME/.m2:/root/.m2 -e MAVEN_OPTS="-Xmx1024m"'
+    }
   }
   options {
     buildDiscarder logRotator(daysToKeepStr: '14', numToKeepStr: '10')
@@ -14,17 +18,26 @@ pipeline {
     pollSCM 'H/15 * * * *'
   }
   stages {
-    stage('Docker build') {
-      agent {
-        docker {
-          image 'maven:3-jdk-8-slim'
-          args '-v $HOME/.m2:/root/.m2'
-          args '-e MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=256m"'
-        }
-      }
+    stage('Maven version') {
       steps {
         sh 'mvn -v'
-        sh './mvnw clean test -DskipWiki'
+      }
+    }
+
+    stage('Build') {
+      steps {
+        sh 'mvn -B -DskipTests -DskipWiki clean package'
+      }
+    }
+
+    stage('Test') {
+      steps {
+        sh 'mvn test'
+      }
+      post {
+        always {
+          junit 'target/surefire-reports/*.xml'
+        }
       }
     }
   }