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

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


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

commit f9289cc8941863e10c83b8fd7bba08b6cf43cd7c
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 6b2e9eee631..8af27ec1232 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'))
@@ -1244,3 +1236,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