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

sblackmon pushed a commit to branch snapshots
in repository https://gitbox.apache.org/repos/asf/streams.git


The following commit(s) were added to refs/heads/snapshots by this push:
     new 75557806f5 new structure
75557806f5 is described below

commit 75557806f52537ccb32b17721656cecd8ee72b67
Author: Steve Blackmon <sblack...@apache.org>
AuthorDate: Fri Feb 16 13:57:20 2024 -0600

    new structure
    
    Signed-off-by: Steve Blackmon <sblack...@apache.org>
---
 Jenkinsfile | 54 +++++++++++++++++++++++++++++++++++++++++-------------
 1 file changed, 41 insertions(+), 13 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index cfa5931381..992292b89e 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -11,35 +11,63 @@
 // * specific language governing permissions and limitations under the 
License.                                              *
 // 
***************************************************************************************************************************
 
-timestamps {
+def AGENT_LABEL = env.AGENT_LABEL ?: 'ubuntu'
+def JDK_NAME = env.JDK_NAME ?: 'jdk_17_latest'
+def MVN_NAME = env.MVN_NAME ?: 'maven_3_latest'
 
-       node ('ubuntu') {
+pipeline {
 
-               stage ('Streams - Checkout') {
-                       checkout([$class: 'GitSCM', branches: [[name: 
'*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], 
submoduleCfg: [], userRemoteConfigs: [[credentialsId: '', url: 
'https://github.com/apache/streams']]])
-               }
+       agent {
+        node {
+            label AGENT_LABEL
+        }
+    }
+
+    tools {
+        maven MVN_NAME
+        jdk JDK_NAME
+    }
 
-               stage ('Streams - Build') {
+    environment {
+        LANG = 'C.UTF-8'
+        MAVEN_CLI_OPTS = "--batch-mode --errors --fail-at-end --show-version 
--no-transfer-progress"
+    }
 
-            def JAVA_JDK_17=tool name: 'jdk_17_latest', type: 
'hudson.model.JDK'
-            def MAVEN_3_LATEST=tool name: 'maven_3_latest', type: 
'hudson.tasks.Maven$MavenInstallation'
+    stages {
+
+               stage ('Build') {
+            steps {
+                           sh "mvn ${MAVEN_CLI_OPTS} -P 'java-17' 
-Dmaven.test.skip.exec=true clean install"
+                       }
+                       post {
+                success {
+                    archiveArtifacts '**/target/*.jar'
+                }
+            }
+               }
 
-                       
withEnv(["Path+JDK=$JAVA_JDK_17/bin","Path+MAVEN=$MAVEN_3_LATEST/bin","JAVA_HOME=$JAVA_JDK_17"])
 {
-                sh "mvn -P 'java-17' clean install"
+        stage ('Test') {
+            steps {
+                           sh "mvn ${MAVEN_CLI_OPTS} -P 'java-17' verify"
                        }
+                       post {
+                always {
+                    junit testResults: '**/target/surefire-reports/TEST-*.xml'
+                }
+            }
                }
 
-        stage('Deploy snapshots') {
+        stage('Deploy') {
             when {
                 branch 'snapshots'
             }
             steps {
                 // Use release profile defined in project pom.xml
-                sh "mvn package -Dmaven.test.skip.exec=true deploy"
+                sh "mvn ${MAVEN_CLI_OPTS} -Dmaven.test.skip.exec=true deploy"
             }
         }
 
-               stage ('Streams - Post build actions') {
+               stage ('Notify') {
                        step([$class: 'Mailer', notifyEveryUnstableBuild: true, 
recipients: 'd...@streams.apache.org', sendToIndividuals: true])
                }
        }

Reply via email to