]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
CI: no pipeline for WIP commits
authorMaria Matejka <mq@ucw.cz>
Fri, 11 Apr 2025 19:47:45 +0000 (21:47 +0200)
committerMaria Matejka <mq@ucw.cz>
Tue, 29 Apr 2025 18:04:32 +0000 (20:04 +0200)
We'd like to encourage team members to push WIP work to Gitlab. Such
work often fails to build and therefore we run no tests for these
branches.

.gitlab-ci.yml

index 5afefadae68024382f3ec4b9e70d5ebbc22e1495..807cfd14cbe32b12180ab04b8e25602218f37276 100644 (file)
@@ -19,6 +19,12 @@ stages:
   - test
   - release
 
+## Common rules
+.never_wip: &never_wip
+  # Ignore WIP commits
+  if: $CI_COMMIT_MESSAGE =~ /^(fixup! )*WIP/
+  when: never
+
 ## Docker Image Rules
 #
 # We are running all the build / packaging tests in Dockers (unless otherwise)
@@ -44,6 +50,8 @@ stages:
   # That's Docker in Docker
   - dind
   rules:
+  - *never_wip
+
     # Never rebuild for tags
   - if: '$CI_COMMIT_TAG'
     when: never
@@ -241,6 +249,9 @@ docker-ubuntu-24_10-amd64:
   - $MAKE check
   # Build docs when tools are available
   - if which linuxdoc pdflatex sgmlsasp >/dev/null ; then $MAKE docs ; fi
+  rules:
+  - *never_wip
+  - when: always
 
 # A special task for preparing the release archives
 build-release:
@@ -259,6 +270,9 @@ build-release:
       - obj/doc/bird-singlepage.html
       - bird-*.tar.gz
     expire_in: 1 day
+  rules:
+  - *never_wip
+  - when: always
 
 .build-linux: &build-linux
   <<: *build-base
@@ -488,6 +502,9 @@ build-only-static:
   artifacts:
     paths:
       - pkg/pkgs/*
+  rules:
+  - *never_wip
+  - when: always
 
 .pkg-deb-legacy: &pkg-deb-legacy
   stage: pkg
@@ -504,6 +521,9 @@ build-only-static:
   artifacts:
     paths:
       - pkg/pkgs/*
+  rules:
+  - *never_wip
+  - when: always
 
 .pkg-rpm: &pkg-rpm
   stage: pkg
@@ -514,6 +534,9 @@ build-only-static:
   artifacts:
     paths:
       - pkg/pkgs/*
+  rules:
+  - *never_wip
+  - when: always
 
 .pkg-rpm-wa: &pkg-rpm-wa
   stage: pkg
@@ -527,6 +550,9 @@ build-only-static:
   artifacts:
     paths:
       - pkg/pkgs/*
+  rules:
+  - *never_wip
+  - when: always
 
 pkg-centos-7-amd64:
   <<: *pkg-rpm-wa
@@ -710,6 +736,9 @@ build-netlab:
       - $BDIR/bird
       - $BDIR/birdc
     expire_in: 2 hours
+  rules:
+  - *never_wip
+  - when: always
 
 .test: &test-base
   stage: test
@@ -727,6 +756,9 @@ build-netlab:
     - cd netlab
     - sudo ./stop
     - sudo ./runtest -s v2 -m check $TEST_NAME
+  rules:
+  - *never_wip
+  - when: always
 
 test-babel-base:
   <<: *test-base
@@ -896,6 +928,9 @@ test-mpls-bgp-l3vpn:
     - ./configure $CONFIGURE_OPTIONS
     - gmake
     - gmake check
+  rules:
+  - *never_wip
+  - when: always
 
 # There is no docker for BSD's, these are proper virtuals in QEMU.
 build-birdlab-freebsd-13: