From d5d395930efee57fe843895955b8ead1f1fe0d0a Mon Sep 17 00:00:00 2001 From: Maria Matejka Date: Fri, 11 Apr 2025 21:47:45 +0200 Subject: [PATCH] CI: no pipeline for WIP commits 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 | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5afefadae..807cfd14c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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: -- 2.47.3