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

commit 7a25f038da129ebcd1cd2822770e39db707d6fa3
Author: Duo Zhang <[email protected]>
AuthorDate: Thu Jun 27 23:10:37 2024 +0800

    HBASE-28694 Make client integration and packaging test work with java 17
---
 dev-support/Jenkinsfile | 23 ++++++++++++-----------
 1 file changed, 12 insertions(+), 11 deletions(-)

diff --git a/dev-support/Jenkinsfile b/dev-support/Jenkinsfile
index 0a47726e53c..b064f4656ad 100644
--- a/dev-support/Jenkinsfile
+++ b/dev-support/Jenkinsfile
@@ -754,15 +754,12 @@ pipeline {
         // TODO (HBASE-23870): replace this with invocation of the release tool
         stage ('packaging and integration') {
           agent {
-            node {
+            dockerfile {
+              dir 'dev-support/docker'
               label 'hbase-large'
+              args '-v /etc/passwd:/etc/passwd:ro -v /etc/group:/etc/group:ro'
             }
           }
-          tools {
-            maven 'maven_latest'
-            // this needs to be set to the jdk that ought to be used to build 
releases on the branch the Jenkinsfile is stored in.
-            jdk "jdk_1.8_latest"
-          }
           environment {
             BASEDIR = "${env.WORKSPACE}/component"
             BRANCH = "${env.BRANCH_NAME}"
@@ -799,7 +796,8 @@ pipeline {
             '''
             sh """#!/bin/bash -e
               echo "Checking the steps for an RM to make a source artifact, 
then a binary artifact."
-              if "${env.BASEDIR}/dev-support/hbase_nightly_source-artifact.sh" 
\
+              if JAVA_HOME="/usr/lib/jvm/java-17" 
PATH=$PATH:$MAVEN_HOME/bin/mvn" \
+                  ${env.BASEDIR}/dev-support/hbase_nightly_source-artifact.sh" 
\
                   --intermediate-file-dir output-srctarball \
                   --unpack-temp-dir unpacked_src_tarball \
                   --maven-m2-initial .m2-for-repo \
@@ -834,11 +832,12 @@ pipeline {
             '''
             unstash 'hadoop-2'
             sh '''#!/bin/bash -xe
-              if [[ "${BRANCH}" = branch-2* ]]; then
+              if [[ "${BRANCH}" = *"branch-2"* ]]; then
                 echo "Attempting to use run an instance on top of Hadoop 2."
                 artifact=$(ls -1 "${WORKSPACE}"/hadoop-2*.tar.gz | head -n 1)
                 tar --strip-components=1 -xzf "${artifact}" -C "hadoop-2"
-                if ! 
"${BASEDIR}/dev-support/hbase_nightly_pseudo-distributed-test.sh" \
+                if ! JAVA_HOME="/usr/lib/jvm/java-8" \
+                    
"${BASEDIR}/dev-support/hbase_nightly_pseudo-distributed-test.sh" \
                     --single-process \
                     --working-dir output-integration/hadoop-2 \
                     --hbase-client-install "hbase-client" \
@@ -870,7 +869,8 @@ pipeline {
                 hbase_install_dir="hbase-hadoop3-install"
                 hbase_client_dir="hbase-hadoop3-client"
               fi
-              if ! 
"${BASEDIR}/dev-support/hbase_nightly_pseudo-distributed-test.sh" \
+              if ! JAVA_HOME="/usr/lib/jvm/java-17" \
+                  
"${BASEDIR}/dev-support/hbase_nightly_pseudo-distributed-test.sh" \
                   --single-process \
                   --working-dir output-integration/hadoop-3 \
                   --hbase-client-install ${hbase_client_dir} \
@@ -885,7 +885,8 @@ pipeline {
                 exit 2
               fi
               echo "Attempting to use run an instance on top of Hadoop 3, 
relying on the Hadoop client artifacts for the example client program."
-              if ! 
"${BASEDIR}/dev-support/hbase_nightly_pseudo-distributed-test.sh" \
+              if ! JAVA_HOME="/usr/lib/jvm/java-17" \
+                  
"${BASEDIR}/dev-support/hbase_nightly_pseudo-distributed-test.sh" \
                   --single-process \
                   --hadoop-client-classpath 
hadoop-3/share/hadoop/client/hadoop-client-api-*.jar:hadoop-3/share/hadoop/client/hadoop-client-runtime-*.jar
 \
                   --working-dir output-integration/hadoop-3-shaded \

Reply via email to