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

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


The following commit(s) were added to refs/heads/branch-2 by this push:
     new e5b04a361a8 HBASE-29067 Addendum fix syntax error
e5b04a361a8 is described below

commit e5b04a361a889f63e712df3f734f2670bfdd6a54
Author: Duo Zhang <[email protected]>
AuthorDate: Tue Jan 14 18:48:54 2025 +0800

    HBASE-29067 Addendum fix syntax error
    
    (cherry picked from commit 28f1b515ac7c934773a34b39d0532020dd8f7003)
---
 dev-support/Jenkinsfile | 22 +++++++++++++---------
 1 file changed, 13 insertions(+), 9 deletions(-)

diff --git a/dev-support/Jenkinsfile b/dev-support/Jenkinsfile
index 4e7fba68aa0..941d8f5ee0e 100644
--- a/dev-support/Jenkinsfile
+++ b/dev-support/Jenkinsfile
@@ -21,15 +21,7 @@ pipeline {
     }
   }
   triggers {
-    if (env.BRANCH_NAME == 'master') {
-      pollSCM('H H 1-31/3 * *')
-    } else if (env.BRANCH_NAME == 'branch-3') {
-      pollSCM('H H 1-31/3 * *')
-    } else if (env.BRANCH_NAME == 'branch-2') {
-      pollSCM('H H 2-31/3 * *')
-    } else {
-      pollSCM('H H 3-31/3 * *')
-    }
+    pollSCM(getCronParams(env.BRANCH_NAME))
   }
   options {
     buildDiscarder(logRotator(numToKeepStr: '20'))
@@ -1243,3 +1235,15 @@ String getJavaHomeForYetusGeneralCheck(String 
branchName) {
     return "/usr/lib/jvm/java-17"
   }
 }
+@NonCPS
+String getCronParams(String branchName) {
+  if (branchName == 'master') {
+    return 'H H 1-31/3 * *'
+  } else if (branchName == 'branch-3') {
+    return 'H H 1-31/3 * *'
+  } else if (branchName == 'branch-2') {
+    return 'H H 2-31/3 * *'
+  } else {
+    return 'H H 3-31/3 * *'
+  }
+}

Reply via email to