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:31 UTC
[hbase] branch master 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 master
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/master by this push:
new bcad0d9 HBASE-22955 Properly set jdk7 as JAVA_HOME for branches-1 precommit and nightly. (#621)
bcad0d9 is described below
commit bcad0d9f98b61141e82969686df93fcda171c61c
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)
---
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 211d76a..36cb375 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