You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@community.apache.org by bd...@apache.org on 2023/04/21 10:00:01 UTC

[comdev-site] branch main updated: Re-activate preview with branch name pattern

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

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


The following commit(s) were added to refs/heads/main by this push:
     new 68040c2  Re-activate preview with branch name pattern
68040c2 is described below

commit 68040c23ed04338ba8dc576504be8140eda5e0d8
Author: Bertrand Delacretaz <bd...@apache.org>
AuthorDate: Fri Apr 21 11:59:52 2023 +0200

    Re-activate preview with branch name pattern
---
 Jenkinsfile | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index 845352d..9a7cd9a 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -31,11 +31,8 @@ pipeline {
         PAGEFIND_HASH = '3e450176562b65359f855c04894ec2c07ffd30a8d08ef4d5812f8d3469d7a58f'
     }
 
-    // TODO_TRIGGER how to run the pipeline only for branches that match the below regexp?
-    // To avoid recursively building staging branches
-    // expression {
-    //   return env.BRANCH_NAME ==~ /(main|preview\/[a-zA-Z0-9_]+$)/
-    // }
+    // TODO should add a pipeline trigger that ignores branches having -staging in their
+    // name, not sure how to do that
 
     stages {
         stage('Prepare') {
@@ -118,12 +115,10 @@ pipeline {
         stage('Staging') {
             // Mostly duplicated from the Deploy branch, there must be a better way...
             when {
-                anyOf {
-                    branch 'TODO_DISABLED_FOR_NOW_SEE_TODO_TRIGGER_above'
+                allOf {
+                    // ignore branches named preview/*-staging to avoid infinite loop..
+                    expression { env.BRANCH_NAME ==~ /preview\/[a-zA-Z0-9_]+$/ }
                 }
-                //not {
-                //    branch 'main'
-                //}
             }
             steps {
                 script {