You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by zr...@apache.org on 2018/03/23 08:53:16 UTC

[camel] 01/02: CAMEL-11930: enable configuration override via ...

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

zregvart pushed a commit to branch test-jenkinsfile
in repository https://gitbox.apache.org/repos/asf/camel.git

commit d95f1550cdfec90c5cde59113acff0c67f244db7
Author: Zoran Regvart <zr...@apache.org>
AuthorDate: Fri Mar 23 09:51:14 2018 +0100

    CAMEL-11930: enable configuration override via ...
    
    ...environment variables
    
    It could be easier to set environment variables in the job configuration
    to configure the pipeline job. With this Jenkins node name/label
    selector can be specified in `AGENT_LABEL`, likewise `JDK_NAME` is the
    name of JDK installation in Jenkins and additionally `LOCAL_REPOSITORY`
    environment variable can point to a local repository that the artifacts
    are installed to.
---
 Jenkinsfile | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index 88a2910..b32bb8d 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -17,16 +17,20 @@
  * under the License.
  */
 
-def MAVEN_PARAMS = '-U -B -e -fae -V -Dmaven.repo.local=/home/jenkins/jenkins-slave/maven-repositories/0 -Dmaven.compiler.fork=true -Dsurefire.rerunFailingTestsCount=2'
+def LOCAL_REPOSITORY = env.LOCAL_REPOSITORY ?: '/home/jenkins/jenkins-slave/maven-repositories/0'
+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.repo.local=${LOCAL_REPOSITORY} -Dmaven.compiler.fork=true -Dsurefire.rerunFailingTestsCount=2"
 
 pipeline {
 
     agent {
-        label 'ubuntu'
+        label AGENT_LABEL
     }
 
     tools {
-        jdk 'JDK 1.8 (latest)'
+        jdk JDK_NAME
     }
 
     options {

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