You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@community.apache.org by se...@apache.org on 2023/04/22 12:32:17 UTC

[comdev-site] branch preview/test2 updated: Test exclude staging fix

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

sebb pushed a commit to branch preview/test2
in repository https://gitbox.apache.org/repos/asf/comdev-site.git


The following commit(s) were added to refs/heads/preview/test2 by this push:
     new cff1d0b  Test exclude staging fix
cff1d0b is described below

commit cff1d0b6a9563cd9eb1b5374915884b69bd04878
Author: Sebb <se...@apache.org>
AuthorDate: Sat Apr 22 13:32:06 2023 +0100

    Test exclude staging fix
---
 Jenkinsfile | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index 582128d..b534c1c 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -111,11 +111,14 @@ pipeline {
         }
         stage('Staging') {
             // Mostly duplicated from the Deploy branch, there must be a better way...
+            // https://www.jenkins.io/doc/book/pipeline/syntax/#built-in-conditions
+            // branch uses Ant-style patterns by default:
+            // https://ant.apache.org/manual/dirtasks.html#patterns
+            // Exclude branches ending in '-staging'
+            // This agrees with the definition of STAGING_BRANCH
             when {
-                allOf {
-                    // ignore branches named preview/*-staging to avoid infinite loop..
-                    // WARNING: do not allow '-' in preview source branch names or the loop will return...
-                    expression { env.BRANCH_NAME ==~ /preview\/[a-zA-Z0-9_]+$/ }
+                not {
+                  branch '**/*-staging'
                 }
             }
             steps {