You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by bu...@apache.org on 2019/09/17 04:01:29 UTC

[hbase] branch branch-2.1 updated: HBASE-22955 Properly set jdk7 as JAVA_HOME for branches-1 precommit and nightly. (#621)

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

busbey pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2.1 by this push:
     new 1cbed07  HBASE-22955 Properly set jdk7 as JAVA_HOME for branches-1 precommit and nightly. (#621)
1cbed07 is described below

commit 1cbed077f1de2fc3d38a44b1ecec06df26fe391b
Author: Sean Busbey <bu...@apache.org>
AuthorDate: Thu Sep 12 20:35:29 2019 -0500

    HBASE-22955 Properly set jdk7 as JAVA_HOME for branches-1 precommit and nightly. (#621)
    
    master/branches-2 specific changes: work around yetus overwriting JAVA_HOME
    in the container with the host JAVA_HOME.
    
    Signed-off-by: Nick Dimiduk <nd...@apache.org>
    (cherry picked from commit 41990ba20aab61379d6cf575b7eb2776eb55d883)
    (cherry picked from commit bcad0d9f98b61141e82969686df93fcda171c61c)
---
 dev-support/Jenkinsfile_GitHub     |  4 ++++
 dev-support/hbase-personality.sh   | 17 +++++++++++++++++
 dev-support/hbase_nightly_yetus.sh |  4 ++++
 3 files changed, 25 insertions(+)

diff --git a/dev-support/Jenkinsfile_GitHub b/dev-support/Jenkinsfile_GitHub
index 693a1c8..c9f5f17 100644
--- a/dev-support/Jenkinsfile_GitHub
+++ b/dev-support/Jenkinsfile_GitHub
@@ -110,6 +110,10 @@ pipeline {
                         if [[ "true" = "${DEBUG}" ]]; then
                             YETUS_ARGS+=("--debug")
                         fi
+                        # If we're doing docker, make sure we don't accidentally pollute the image with a host java path
+                        if [ -n "${JAVA_HOME}" ]; then
+                          unset JAVA_HOME
+                        fi
                         YETUS_ARGS+=("--patch-dir=${WORKSPACE}/${PATCHDIR}")
                         # where the source is located
                         YETUS_ARGS+=("--basedir=${WORKSPACE}/${SOURCEDIR}")
diff --git a/dev-support/hbase-personality.sh b/dev-support/hbase-personality.sh
index b4b7880..84b90be 100755
--- a/dev-support/hbase-personality.sh
+++ b/dev-support/hbase-personality.sh
@@ -45,6 +45,23 @@ if ! declare -f "yetus_info" >/dev/null; then
 
 fi
 
+# work around yetus overwriting JAVA_HOME from our docker image
+function docker_do_env_adds
+{
+  declare k
+
+  for k in "${DOCKER_EXTRAENVS[@]}"; do
+    if [[ "JAVA_HOME" == "${k}" ]]; then
+      if [ -n "${JAVA_HOME}" ]; then
+        DOCKER_EXTRAARGS+=("--env=JAVA_HOME=${JAVA_HOME}")
+      fi
+    else
+      DOCKER_EXTRAARGS+=("--env=${k}=${!k}")
+    fi
+  done
+}
+
+
 ## @description  Globals specific to this personality
 ## @audience     private
 ## @stability    evolving
diff --git a/dev-support/hbase_nightly_yetus.sh b/dev-support/hbase_nightly_yetus.sh
index 3c9e270..9159057 100755
--- a/dev-support/hbase_nightly_yetus.sh
+++ b/dev-support/hbase_nightly_yetus.sh
@@ -40,6 +40,10 @@ if [[ -n "${MULTIJDK}" ]]; then
   YETUS_ARGS=("--multijdkdirs=${MULTIJDK}" "${YETUS_ARGS[@]}")
 fi
 
+# If we're doing docker, make sure we don't accidentally pollute the image with a host java path
+if [ -n "${JAVA_HOME}" ]; then
+  unset JAVA_HOME
+fi
 if [[ -n "${SET_JAVA_HOME}" ]]; then
   YETUS_ARGS=("--java-home=${SET_JAVA_HOME}" "${YETUS_ARGS[@]}")
 fi