You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by sr...@apache.org on 2018/02/22 11:27:28 UTC

[incubator-plc4x] branch feature/Jenkinsfile_update updated (cea2e41 -> 9b6a682)

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

sruehl pushed a change to branch feature/Jenkinsfile_update
in repository https://gitbox.apache.org/repos/asf/incubator-plc4x.git.


 discard cea2e41  migrate to declarative jenkins pipeline
     new 9b6a682  migrate to declarative jenkins pipeline

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (cea2e41)
            \
             N -- N -- N   refs/heads/feature/Jenkinsfile_update (9b6a682)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 Jenkinsfile | 6 ------
 1 file changed, 6 deletions(-)

-- 
To stop receiving notification emails like this one, please contact
sruehl@apache.org.

[incubator-plc4x] 01/01: migrate to declarative jenkins pipeline

Posted by sr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

sruehl pushed a commit to branch feature/Jenkinsfile_update
in repository https://gitbox.apache.org/repos/asf/incubator-plc4x.git

commit 9b6a682fc8a6d0a205e66b6c34126670da952a23
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Thu Feb 22 12:25:36 2018 +0100

    migrate to declarative jenkins pipeline
---
 Jenkinsfile | 88 +++++++++++++++++++++++++++++++------------------------------
 1 file changed, 45 insertions(+), 43 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index 9d02cc8..0738d62 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -18,60 +18,62 @@
  *  limitations under the License.
  *
  */
-// TODO: migrate to declarative pipeline if possible (https://jenkins.io/doc/book/pipeline/jenkinsfile/)
-node('ubuntu && !H33') {
-
-    currentBuild.result = "SUCCESS"
-
-    echo 'Building Branch: ' + env.BRANCH_NAME
-
-    // Setup the required environment variables.
-    def mvnHome = "${tool 'Maven 3 (latest)'}"
-    env.JAVA_HOME="${tool 'JDK 1.8 (latest)'}"
-    env.PATH="${env.JAVA_HOME}/bin:${env.PATH}"
+pipeline {
+    agent {
+        node {
+            label 'ubuntu && !H33'
+        }
+    }
 
-    // Make sure the feature branches don't change the SNAPSHOTS in Nexus.
-    def mavenGoal = "install"
-    def mavenLocalRepo = ""
-    if(env.BRANCH_NAME == 'master') {
-        mavenGoal = "deploy sonar:sonar"
-    } else {
-        mavenLocalRepo = "-Dmaven.repo.local=.repository"
+    environment {
+        CC = 'clang'
+        MVN_HOME = "${tool 'Maven 3 (latest)'}"
+        JAVA_HOME = "${tool 'JDK 1.8 (latest)'}"
+        PATH = "${env.JAVA_HOME}/bin:${env.PATH}"
     }
 
-    try {
-        stage ('Cleanup') {
-            echo 'Cleaning up the workspace'
-            deleteDir()
+    stages {
+        stage('Initialization') {
+            steps {
+                echo 'Building Branch: ' + env.BRANCH_NAME
+            }
         }
 
-        stage ('Checkout') {
-            echo 'Checking out branch ' + env.BRANCH_NAME
-            checkout scm
+        stage('Cleanup') {
+            steps {
+                echo 'Cleaning up the workspace'
+                deleteDir()
+            }
         }
 
-        stage ('Build') {
-            echo 'Building'
-            sh "${mvnHome}/bin/mvn -Pjenkins-build ${mavenLocalRepo} clean ${mavenGoal} site:site"
+        stage('Checkout') {
+            steps {
+                echo 'Checking out branch ' + env.BRANCH_NAME
+                checkout scm
+            }
         }
 
-        stage ('Stage Site') {
-            echo 'Staging Site'
-            sh "${mvnHome}/bin/mvn -Pjenkins-build ${mavenLocalRepo} site:stage"
+        stage('Build') {
+            steps {
+                // Make sure the feature branches don't change the SNAPSHOTS in Nexus.
+                def mavenGoal = "install"
+                def mavenLocalRepo = ""
+                if (env.BRANCH_NAME == 'master') {
+                    mavenGoal = "deploy sonar:sonar"
+                } else {
+                    mavenLocalRepo = "-Dmaven.repo.local=.repository"
+                }
+                echo 'Building'
+                sh "${MVN_HOME}/bin/mvn -Pjenkins-build ${mavenLocalRepo} clean ${mavenGoal} site:site"
+            }
         }
 
-    }
-
+        stage('Stage Site') {
+            steps {
+                echo 'Staging Site'
+                sh "${MVN_HOME}/bin/mvn -Pjenkins-build ${mavenLocalRepo} site:stage"
+            }
+        }
 
-    catch (err) {
-        currentBuild.result = "FAILURE"
-/*            mail body: "project build error is here: ${env.BUILD_URL}" ,
-            from: 'xxxx@yyyy.com',
-            replyTo: 'dev@plc4x.apache.org',
-            subject: 'Autobuild for Branch ' env.BRANCH_NAME
-            to: 'commits@plc4x.apache.org'
-*/
-        throw err
     }
-
 }
\ No newline at end of file

-- 
To stop receiving notification emails like this one, please contact
sruehl@apache.org.