From: Daniel P. Berrangé Date: Tue, 16 Nov 2021 11:27:57 +0000 (+0000) Subject: gitlab: skip cirrus jobs on master and stable branches X-Git-Tag: nvme-fixes-for-6.2-pull-request~10^2 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=9968de0a4a5470bd7b98dcd2fae5d5269908f16b;p=qemu-nvme.git gitlab: skip cirrus jobs on master and stable branches On the primary QEMU repository we want the CI jobs to run on the staging branch as a gating CI test. Cirrus CI has very limited job concurrency, so if there are too many jobs triggered they'll queue up and hit the GitLab CI job timeout before they complete on Cirrus. If we let Cirrus jobs run again on the master branch immediately after merging from staging, that just increases the chances jobs will get queued and subsequently timeout. The same applies for merges to the stable branches. User forks meanwhile should be allowed to run Cirrus CI jobs freely. Signed-off-by: Daniel P. Berrangé Reviewed-by: Richard Henderson Reviewed-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Willian Rampazzo Message-Id: <20211116112757.1909176-1-berrange@redhat.com> Signed-off-by: Alex Bennée --- diff --git a/.gitlab-ci.d/cirrus.yml b/.gitlab-ci.d/cirrus.yml index e7b25e7427..cc2f2e8906 100644 --- a/.gitlab-ci.d/cirrus.yml +++ b/.gitlab-ci.d/cirrus.yml @@ -40,6 +40,9 @@ - cat .gitlab-ci.d/cirrus/$NAME.yml - cirrus-run -v --show-build-log always .gitlab-ci.d/cirrus/$NAME.yml rules: + # Allow on 'staging' branch and 'stable-X.Y-staging' branches only + - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH !~ /staging/' + when: never - if: "$CIRRUS_GITHUB_REPO && $CIRRUS_API_TOKEN" x64-freebsd-12-build: