From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Thomas Huth" <thuth@redhat.com>,
"Daniel P . Berrange" <berrange@redhat.com>,
"Laszlo Ersek" <lersek@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@redhat.com>,
"Bin Meng" <bmeng.cn@gmail.com>,
"Alex Bennée" <alex.bennee@linaro.org>
Subject: [PATCH-for-5.2 2/2] gitlab-ci: Avoid running the EDK2 job when not necessary
Date: Tue, 10 Nov 2020 13:16:06 +0100 [thread overview]
Message-ID: <20201110121606.2792442-3-philmd@redhat.com> (raw)
In-Reply-To: <20201110121606.2792442-1-philmd@redhat.com>
The EDK2 jobs use the 'changes' keyword, which "makes it
possible to define if a job should be created based on files
modified by a Git push event." (see [1]). This keyword comes
with a warning:
Caution:
In pipelines with sources other than the three above
changes can’t determine if a given file is new or old
and always returns true."
In commit 922febe2af we moved the YAML config file from the
repository root directory to the .gitlab-ci.d/ directory.
We didn't respect the previous warning and disabled the
'changes' filter rule, as the files are now in a (directory)
three above the YAML config file.
This jobs takes ~40min, and needlessly burns the 2000 minutes
available to GitLab free users. Follow the recommendations in
[3] and disable this job by default (except if we push a tag
or the branch contains 'edk2'). Note we do not remove the job
from the pipeline, it can still be triggered manually from the
WebUI.
[1] https://docs.gitlab.com/ee/ci/yaml/#onlychangesexceptchanges
[2] https://about.gitlab.com/releases/2020/03/18/ci-minutes-for-free-users/
[3] https://about.gitlab.com/pricing/faq-consumption-cicd/
Fixes: 922febe2af ("Move edk2 and opensbi YAML files to .gitlab-ci.d folder")
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
.gitlab-ci.d/edk2.yml | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/.gitlab-ci.d/edk2.yml b/.gitlab-ci.d/edk2.yml
index e1e04524166..335c99035c9 100644
--- a/.gitlab-ci.d/edk2.yml
+++ b/.gitlab-ci.d/edk2.yml
@@ -1,10 +1,5 @@
docker-edk2:
stage: containers
- rules: # Only run this job when the Dockerfile is modified
- - changes:
- - .gitlab-ci.d/edk2.yml
- - .gitlab-ci.d/edk2/Dockerfile
- when: always
image: docker:19.03.1
services:
- docker:19.03.1-dind
@@ -26,13 +21,15 @@ docker-edk2:
build-edk2:
stage: build
rules: # Only run this job when ...
- - changes: # ... roms/edk2/ is modified (submodule updated)
- - roms/edk2/*
+ - if: $CI_COMMIT_TAG # we pushed a tag
when: always
- if: '$CI_COMMIT_REF_NAME =~ /^edk2/' # or the branch/tag starts with 'edk2'
when: always
- if: '$CI_COMMIT_MESSAGE =~ /edk2/i' # or last commit description contains 'EDK2'
when: always
+ # ... else allow manual run on the WebUI
+ - when: manual
+ allow_failure: true
artifacts:
paths: # 'artifacts.zip' will contains the following files:
- pc-bios/edk2*bz2
--
2.26.2
next prev parent reply other threads:[~2020-11-10 12:18 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-10 12:16 [PATCH-for-5.2 0/2] gitlab-ci: Fix EDK2 & OpenSBI jobs Philippe Mathieu-Daudé
2020-11-10 12:16 ` [PATCH-for-5.2 1/2] gitlab-ci: Avoid running the OpenSBI job when not necessary Philippe Mathieu-Daudé
2020-11-10 14:33 ` Daniel P. Berrangé
2020-11-10 15:07 ` Philippe Mathieu-Daudé
2020-11-10 12:16 ` Philippe Mathieu-Daudé [this message]
2020-11-10 15:35 ` [PATCH-for-5.2 2/2] gitlab-ci: Avoid running the EDK2 " Daniel P. Berrangé
2020-11-11 9:18 ` Philippe Mathieu-Daudé
2021-01-17 18:48 ` Philippe Mathieu-Daudé
2021-01-18 8:30 ` Thomas Huth
2021-01-18 9:26 ` Philippe Mathieu-Daudé
2021-01-18 10:09 ` Daniel P. Berrangé
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=20201110121606.2792442-3-philmd@redhat.com \
--to=philmd@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=berrange@redhat.com \
--cc=bmeng.cn@gmail.com \
--cc=lersek@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=thuth@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.