You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2021/02/13 15:45:33 UTC

[camel] branch master updated: Upgrade Jenkinsfile for JDK8 to use JAVA_HOME for openjdk

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

acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/master by this push:
     new d3903fb  Upgrade Jenkinsfile for JDK8 to use JAVA_HOME for openjdk
d3903fb is described below

commit d3903fb6736ae77b396528389e911a969dd78daf
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Sat Feb 13 16:44:37 2021 +0100

    Upgrade Jenkinsfile for JDK8 to use JAVA_HOME for openjdk
---
 Jenkinsfile | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index 641735f..a83bbf6 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -18,7 +18,6 @@
  */
 
 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 -Dnoassembly -Dmaven.compiler.fork=true -Dsurefire.rerunFailingTestsCount=2"
 
@@ -28,10 +27,6 @@ pipeline {
         label AGENT_LABEL
     }
 
-    tools {
-        jdk JDK_NAME
-    }
-
     environment {
         MAVEN_SKIP_RC = true
     }
@@ -59,6 +54,9 @@ pipeline {
         }
 
         stage('Build & Deploy') {
+            environment {
+                JAVA_HOME = "/home/jenkins/tools/java/adoptopenjdk-hotspot-8u282-b08"
+            }
             when {
                 branch 'master'
             }
@@ -68,6 +66,9 @@ pipeline {
         }
 
         stage('Website update') {
+            environment {
+                JAVA_HOME = "/home/jenkins/tools/java/adoptopenjdk-hotspot-8u282-b08"
+            }
             when {
                 branch 'master'
                 changeset 'docs/**/*'
@@ -79,6 +80,9 @@ pipeline {
         }
 
         stage('Checks') {
+            environment {
+                JAVA_HOME = "/home/jenkins/tools/java/adoptopenjdk-hotspot-8u282-b08"
+            }
             steps {
                 sh "./mvnw $MAVEN_PARAMS -pl :camel-buildtools install"
                 sh "./mvnw $MAVEN_PARAMS -Psourcecheck -Dcheckstyle.failOnViolation=false checkstyle:check"
@@ -86,6 +90,9 @@ pipeline {
         }
 
         stage('Test') {
+            environment {
+                JAVA_HOME = "/home/jenkins/tools/java/adoptopenjdk-hotspot-8u282-b08"
+            }
             steps {
                 sh "./mvnw $MAVEN_PARAMS -Dmaven.test.failure.ignore=true clean install"
             }