[master] 8c3821c6d Tweak the CircleCI config to be master/release branch agnostic

Martin Blix Grydeland martin at varnish-software.com
Thu Mar 17 13:45:05 UTC 2022


commit 8c3821c6d6e6e82300d481fb960a27a930f8aa39
Author: Martin Blix Grydeland <martin at varnish-software.com>
Date:   Thu Mar 17 13:32:27 2022 +0100

    Tweak the CircleCI config to be master/release branch agnostic
    
    This tweaks the workflows in circleci so that the same configuration can
    be used both in the regular master workflows and the release branches,
    removing a brittle release process step of editing there.

diff --git a/.circleci/config.yml b/.circleci/config.yml
index 7ce929b8b..bf727b86f 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -21,6 +21,10 @@ parameters:
         --enable-debugging-symbols \
         --disable-stack-protector \
         --with-persistent-storage \
+  build-pkgs:
+    type: string
+    default: ""
+
 jobs:
   dist:
     description: Build or download varnish-x.y.z.tar.gz that is used later for the packaging jobs
@@ -363,6 +367,10 @@ jobs:
 workflows:
   version: 2
   commit:
+    unless: &packaging_cond
+      or:
+        - << pipeline.parameters.build-pkgs >>
+        - << pipeline.parameters.dist-url >>
     jobs:
       - distcheck:
           name: distcheck_centos_7
@@ -404,15 +412,9 @@ workflows:
           name: distcheck_archlinux
           dist: archlinux
           release: base-devel
-  nightly:
-    triggers:
-      - schedule:
-          cron: "0 4 * * *"
-          filters:
-            branches:
-              only:
-                - master
-    jobs:
+  packaging:
+    when: *packaging_cond
+    jobs: &packaging_jobs
       - dist
       - tar_pkg_tools
       - package:
@@ -439,3 +441,12 @@ workflows:
       - collect_packages:
           requires:
             - package
+  nightly:
+    triggers:
+      - schedule:
+          cron: "0 4 * * *"
+          filters:
+            branches:
+              only:
+                - master
+    jobs: *packaging_jobs


More information about the varnish-commit mailing list