You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hop.apache.org by ha...@apache.org on 2020/11/06 17:33:13 UTC

[incubator-hop] branch master updated: Initial version Jenkinsfile

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

hansva pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-hop.git


The following commit(s) were added to refs/heads/master by this push:
     new 1aa57bb  Initial version Jenkinsfile
     new 5cf30c2  Merge remote-tracking branch 'upstream/master' into upstream_master
1aa57bb is described below

commit 1aa57bbea0cc20417161a43ac94a2f593d9c28a5
Author: Hans Van Akelyen <ha...@gmail.com>
AuthorDate: Fri Nov 6 16:04:24 2020 +0100

    Initial version Jenkinsfile
---
 Jenkinsfile | 96 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
 1 file changed, 94 insertions(+), 2 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index 2b41e28..6b6583e 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -1,2 +1,94 @@
-@Library('shared-library') _
-javaPipelineV3()
\ No newline at end of file
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+def AGENT_LABEL = env.AGENT_LABEL ?: 'ubuntu'
+def JDK_NAME = env.JDK_NAME ?: 'jdk_1.8_latest'
+
+def MAVEN_PARAMS = "-U -B -e -fae -V -Dmaven.compiler.fork=true -Dsurefire.rerunFailingTestsCount=2"
+
+pipeline {
+
+    agent {
+        label AGENT_LABEL
+    }
+
+    tools {
+        jdk JDK_NAME
+    }
+
+    environment {
+        MAVEN_SKIP_RC = true
+    }
+
+    options {
+        buildDiscarder(
+            logRotator(artifactNumToKeepStr: '5', numToKeepStr: '10')
+        )
+        disableConcurrentBuilds()
+    }
+
+    parameters {
+        booleanParam(name: 'CLEAN', defaultValue: true, description: 'Perform the build in clean workspace')
+    }
+
+    stages {
+        stage('Initialization') {
+              steps {
+                  echo 'Building Branch: ' + env.BRANCH_NAME
+                  echo 'Using PATH = ' + env.PATH
+              }
+         }
+         stage('Cleanup') {
+              steps {
+                  echo 'Cleaning up the workspace'
+                  deleteDir()
+              }
+         }
+        stage('Checkout') {
+            steps {
+                echo 'Checking out branch ' + env.BRANCH_NAME
+                checkout scm
+            }
+        }
+        stage('Test & Build') {
+            when {
+                branch 'master'
+            }
+            steps {
+                sh "./mvnw $MAVEN_PARAMS clean install"
+            }
+            post {
+                always {
+                    junit(testResults: '**/surefire-reports/*.xml', allowEmptyResults: true)
+                    junit(testResults: '**/failsafe-reports/*.xml', allowEmptyResults: true)
+                }
+            }
+        }
+
+    }
+    post {
+        always {
+            emailext(
+                subject: '${DEFAULT_SUBJECT}',
+                body: '${DEFAULT_CONTENT}',
+                recipientProviders: [[$class: 'CulpritsRecipientProvider']]
+            )
+        }
+    }
+}