From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
"Thomas Huth" <thuth@redhat.com>,
"Daniel P . Berrange" <berrange@redhat.com>,
"John Snow" <jsnow@redhat.com>,
"Cornelia Huck" <cohuck@redhat.com>,
"Wainer dos Santos Moschetta" <wainersm@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@redhat.com>,
"Alex Bennée" <alex.bennee@linaro.org>
Subject: [RFC PATCH 9/9] gitlab-ci: Add rules to skip building/testing native jobs
Date: Wed, 4 Nov 2020 23:45:58 +0100 [thread overview]
Message-ID: <20201104224558.3384595-10-philmd@redhat.com> (raw)
In-Reply-To: <20201104224558.3384595-1-philmd@redhat.com>
Add rules to skip various build/test jobs.
The following tags are available to skip CI jobs:
- user (user-mode jobs)
- system (system-mode jobs)
- centos (jobs based on CentOS distribution image)
- debian (... Debian)
- fedora (... Fedora)
- ubuntu (... Ubuntu)
- crypto (jobs testing the crypto feature)
- tci (jobs testing TCI feature)
- fuzz (fuzzer job)
- integration (integration tests)
Developers can combine tags in the SKIP_BUILD variable when
pushing a branch (or tag) to repositories. Examples:
$ git push -o ci.variable="SKIP_BUILD=user" myrepo mybranch
$ git push -o ci.variable="SKIP_BUILD=user,debian,crypto,fuzz" myrepo mybranch
References:
- https://docs.gitlab.com/ee/ci/yaml/#rulesif
- https://docs.gitlab.com/ee/user/project/push_options.html#push-options-for-gitlab-cicd
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
.gitlab-ci.yml | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 961070d2cbe..432daccf590 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -21,6 +21,30 @@ include:
.native_common_job:
image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:latest
+ rules:
+ # If the if statement is true, the job is excluded from a pipeline.
+ - if: ($TARGETS =~ /softmmu/ || $CONFIGURE_ARGS =~ /disable-user/) && $SKIP_BUILD =~ /system/
+ when: never
+ - if: ($TARGETS =~ /user/ || $CONFIGURE_ARGS =~ /disable-system/) && $SKIP_BUILD =~ /user/
+ when: never
+ - if: $IMAGE =~ /^centos/ && $SKIP_BUILD =~ /centos/
+ when: never
+ - if: $IMAGE =~ /^debian/ && $SKIP_BUILD =~ /debian/
+ when: never
+ - if: $IMAGE =~ /^fedora/ && $SKIP_BUILD =~ /fedora/
+ when: never
+ - if: $IMAGE =~ /^ubuntu/ && $SKIP_BUILD =~ /ubuntu/
+ when: never
+ - if: $CI_JOB_NAME =~ /crypto/ && $SKIP_BUILD =~ /crypto/
+ when: never
+ - if: $CI_JOB_NAME =~ /tci/ && $SKIP_BUILD =~ /tci/
+ when: never
+ - if: $CI_JOB_NAME =~ /fuzz/ && $SKIP_BUILD =~ /fuzz/
+ when: never
+ - if: $CI_JOB_NAME =~ /^acceptance/ && $SKIP_BUILD =~ /integration/
+ when: never
+ # In all other cases, the job is added to the pipeline.
+ - when: on_success
.native_build_job:
extends: .native_common_job
--
2.26.2
next prev parent reply other threads:[~2020-11-04 22:52 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-04 22:45 [RFC PATCH 0/9] gitlab-ci: Allow forks to skip some build jobs Philippe Mathieu-Daudé
2020-11-04 22:45 ` [RFC PATCH 1/9] gitlab-ci: Replace YAML anchors by extends (cross_system_build_job) Philippe Mathieu-Daudé
2020-11-04 22:45 ` [RFC PATCH 2/9] gitlab-ci: Replace YAML anchors by extends (native_build_job) Philippe Mathieu-Daudé
2020-11-04 22:45 ` [RFC PATCH 3/9] gitlab-ci: Replace YAML anchors by extends (native_test_job) Philippe Mathieu-Daudé
2020-11-04 22:45 ` [RFC PATCH 4/9] gitlab-ci: Replace YAML anchors by extends (acceptance_test_job) Philippe Mathieu-Daudé
2020-11-04 22:45 ` [RFC PATCH 5/9] gitlab-ci: Rename acceptance_test_job -> integration_test_job Philippe Mathieu-Daudé
2020-11-04 22:45 ` [RFC PATCH 6/9] gitlab-ci: Extract common job definition as 'cross_common_job' Philippe Mathieu-Daudé
2020-11-04 22:45 ` [RFC PATCH 7/9] gitlab-ci: Extract common job definition as 'native_common_job' Philippe Mathieu-Daudé
2020-11-04 22:45 ` [RFC PATCH 8/9] gitlab-ci: Add rules to skip building cross-jobs Philippe Mathieu-Daudé
2020-11-04 22:45 ` Philippe Mathieu-Daudé [this message]
2020-11-05 7:22 ` [RFC PATCH 0/9] gitlab-ci: Allow forks to skip some build jobs Philippe Mathieu-Daudé
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201104224558.3384595-10-philmd@redhat.com \
--to=philmd@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=berrange@redhat.com \
--cc=cohuck@redhat.com \
--cc=jsnow@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=thuth@redhat.com \
--cc=wainersm@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).