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

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

commit 2b41b4ec02342fcbe9d317afdcc9b1be53f838f7
Author: Sebastian Rühl <sru...@apache.org>
AuthorDate: Thu Feb 22 12:52:08 2018 +0100

    simplfy build by using tools section instead of environment variables
---
 Jenkinsfile | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index 31b6d7a..0508652 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -26,10 +26,12 @@ pipeline {
     }
 
     environment {
-        CC = 'clang'
-        MVN_HOME = "${tool 'Maven 3 (latest)'}"
-        JAVA_HOME = "${tool 'JDK 1.8 (latest)'}"
-        PATH = "${env.JAVA_HOME}/bin:${env.PATH}"
+        PLC4X_BUILD = true
+    }
+
+    tools {
+        maven 'Maven 3 (latest)'
+        jdk 'JDK 1.8 (latest)'
     }
 
     stages {
@@ -61,7 +63,7 @@ pipeline {
             }
             steps {
                 echo 'Building'
-                sh "${MVN_HOME}/bin/mvn -Pjenkins-build 
-Dmaven.test.failure.ignore=true -Dmaven.repo.local=.repository clean install"
+                sh "mvn -Pjenkins-build -Dmaven.test.failure.ignore=true 
-Dmaven.repo.local=.repository clean install"
             }
             post {
                 always {
@@ -71,13 +73,13 @@ pipeline {
             }
         }
 
-        stage('Build') {
+        stage('Build master') {
             when {
                 branch 'master'
             }
             steps {
                 echo 'Building'
-                sh "${MVN_HOME}/bin/mvn -Pjenkins-build clean deploy 
sonar:sonar site:site"
+                sh "mvn -Pjenkins-build clean deploy sonar:sonar site:site"
             }
             post {
                 always {
@@ -93,7 +95,7 @@ pipeline {
             }
             steps {
                 echo 'Staging Site'
-                sh "${MVN_HOME}/bin/mvn -Pjenkins-build ${mavenLocalRepo} 
site:stage"
+                sh "mvn -Pjenkins-build ${mavenLocalRepo} site:stage"
             }
         }
 

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

Reply via email to