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

zhangduo pushed a commit to branch HBASE-30004
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/HBASE-30004 by this push:
     new 4196fbf98f4 fix
4196fbf98f4 is described below

commit 4196fbf98f4b0f1d1d8d635b6a6238d4e59304ae
Author: Duo Zhang <[email protected]>
AuthorDate: Tue Mar 17 21:35:39 2026 +0800

    fix
---
 .../generate-hbase-website.Jenkinsfile             | 23 +++++++++++++++++++---
 1 file changed, 20 insertions(+), 3 deletions(-)

diff --git a/dev-support/generate-website/generate-hbase-website.Jenkinsfile 
b/dev-support/generate-website/generate-hbase-website.Jenkinsfile
index cbd10518fcd..bd013f33a5c 100644
--- a/dev-support/generate-website/generate-hbase-website.Jenkinsfile
+++ b/dev-support/generate-website/generate-hbase-website.Jenkinsfile
@@ -47,13 +47,25 @@ pipeline {
           if [ "${FORCE_FAIL}" = "true" ]; then
             false
           fi
+          # wipe out stall files
+          rm -f *.patch *.zip
           docker build -t hbase-build-website -f 
"${WORKSPACE}/component/dev-support/docker/Dockerfile" .
           docker run --rm -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-build-website \
             "component/dev-support/generate-website/build-hbase-website.sh" \
-            --working-dir /hbase
+            --working-dir /hbase component
         '''
-        stash name: 'patch', includes: "*.patch"
+        script {
+          def patchFiles = findFiles(glob: '*.patch')
+          if (patchFiles.length > 0) {
+            echo "Has patch ${patchFiles[0].path}, stash and then publish"
+            stash name: 'patch', includes: "*.patch"
+            env.PUBLISH_WEBSITE = "true"
+          } else {
+            echo "No patch file, skip stashing and publishing"
+            env.PUBLISH_WEBSITE = "false"
+          }
+        }
       }
     }
     stage('publish hbase website') {
@@ -62,13 +74,18 @@ pipeline {
           label 'git-websites'
         }
       }
+      when {
+        expression {
+          return env.PUBLISH_WEBSITE == 'true'
+        }
+      }
       steps {
         unstash 'patch'
         sh '''#!/bin/bash -e
           git clone --depth 1 --branch asf-site 
https://gitbox.apache.org/repos/asf/hbase-site.git
           patch=$(ls -1 *.patch | head -n 1)
           cd hbase-site;
-          echo "applying "
+          echo "applying ${patch}"
           git am ../${patch}
           echo "Publishing changes to remote repo..."
           if git push origin asf-site; then

Reply via email to