This is an automated email from the ASF dual-hosted git repository.
zhangduo pushed a commit to branch HBASE-28694
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/HBASE-28694 by this push:
new 3eea0aaf5f7 fix
3eea0aaf5f7 is described below
commit 3eea0aaf5f782136f6bc9e61f6ad8eb8bc0fddc0
Author: Duo Zhang <[email protected]>
AuthorDate: Fri Jun 28 14:32:49 2024 +0800
fix
---
dev-support/Jenkinsfile | 2 +-
dev-support/hbase_nightly_source-artifact.sh | 24 +++++++++++++-----------
2 files changed, 14 insertions(+), 12 deletions(-)
diff --git a/dev-support/Jenkinsfile b/dev-support/Jenkinsfile
index d3510ba953c..d870c8c1acc 100644
--- a/dev-support/Jenkinsfile
+++ b/dev-support/Jenkinsfile
@@ -802,7 +802,7 @@ pipeline {
echo "Checking the steps for an RM to make a source artifact,
then a binary artifact."
docker build -t hbase-dev-support -f
"${BASEDIR}/dev-support/docker/Dockerfile" .
docker run -v "${WORKSPACE}":/hbase -v
/etc/passwd:/etc/passwd:ro -v /etc/group:/etc/group:ro \
- -u `id -u`:`id -g` -e JAVA_HOME="/usr/lib/jvm/java-17"
--workdir=/hbase hbase-dev-support \
+ -u `id -u`:`id -g` --workdir=/hbase hbase-dev-support \
"component/dev-support/hbase_nightly_source-artifact.sh" \
--intermediate-file-dir output-srctarball \
--unpack-temp-dir unpacked_src_tarball \
diff --git a/dev-support/hbase_nightly_source-artifact.sh
b/dev-support/hbase_nightly_source-artifact.sh
index b8fa540fa22..b45fe54f634 100755
--- a/dev-support/hbase_nightly_source-artifact.sh
+++ b/dev-support/hbase_nightly_source-artifact.sh
@@ -188,14 +188,14 @@ function build_tarball {
local build_log="srctarball_install.log"
local tarball_glob="hbase-*-bin.tar.gz"
if [ $build_hadoop3 -ne 0 ]; then
- local version=$(${MVN} help:evaluate -Dexpression=project.version -q
-DforceStdout)
+ local version=$(${MVN} -Dmaven.repo.local="${m2_tarbuild}" help:evaluate
-Dexpression=project.version -q -DforceStdout)
local hadoop3_version=$(get_hadoop3_version $version)
mvn_extra_args="-Drevision=${hadoop3_version} -Dhadoop.profile=3.0"
build_log="hadoop3_srctarball_install.log"
tarball_glob="hbase-*-hadoop3-*-bin.tar.gz"
echo "Follow the ref guide section on making a RC: Step 8 Build the
hadoop3 binary tarball."
else
- echo "Follow the ref guide section on making a RC: Step 8 Build the binary
tarball."
+ echo "Follow the ref guide section on making a RC: Step 7 Build the binary
tarball."
fi
if ${MVN} --threads=2 -DskipTests -Prelease --batch-mode
-Dmaven.repo.local="${m2_tarbuild}" ${mvn_extra_args} clean install \
assembly:single >"${working_dir}/${build_log}" 2>&1; then
@@ -217,22 +217,24 @@ function build_tarball {
cd "${unpack_dir}"
-build_tarball 0
+${MVN} -Dmaven.repo.local="${m2_tarbuild}" help:active-profiles | grep -q
hadoop-3.0
if [ $? -ne 0 ]; then
- exit 1
-fi
-
-${MVN} help:active-profiles
+ echo "The hadoop-3.0 profile is not activated by default, build a default
tarball first."
+ JAVA_HOME="/usr/lib/jvm/java-8" build_tarball 0
+ if [ $? -ne 0 ]; then
+ exit 1
+ fi
-${MVN} help:active-profiles | grep -q hadoop-3.0
-if [ $? -ne 0 ]; then
- echo "The hadoop-3.0 profile is not activated by default, build a hadoop3
tarball."
# move the previous tarballs out, so it will not be cleaned while building
against hadoop3
mv "${unpack_dir}"/hbase-assembly/target/hbase-*-bin.tar.gz "${unpack_dir}"/
- build_tarball 1
+ echo "build a hadoop3 tarball."
+ JAVA_HOME="/usr/lib/jvm/java-17" build_tarball 1
if [ $? -ne 0 ]; then
exit 1
fi
# move tarballs back
mv "${unpack_dir}"/hbase-*-bin.tar.gz "${unpack_dir}"/hbase-assembly/target/
+else
+ echo "The hadoop-3.0 profile is activated by default, build a default
tarball."
+ JAVA_HOME="/usr/lib/jvm/java-17" build_tarball 0
fi