From: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
To: Thomas Huth <thuth@redhat.com>, qemu-devel@nongnu.org
Cc: "Daniel P . Berrange" <berrange@redhat.com>,
"Alex Bennée" <alex.bennee@linaro.org>,
"Wainer dos Santos Moschetta" <wainersm@redhat.com>,
"Willian Rampazzo" <willianr@redhat.com>,
"Cleber Rosa" <crosa@redhat.com>, "Bin Meng" <bmeng.cn@gmail.com>,
"Laszlo Ersek" <lersek@redhat.com>
Subject: Re: [PATCH] gitlab-ci: Restrict jobs using Docker to runners having 'docker' tag
Date: Mon, 10 May 2021 16:53:53 +0200 [thread overview]
Message-ID: <6ece59c7-6e1c-245d-6b65-93dd374b6810@amsat.org> (raw)
In-Reply-To: <a4147360-9cb4-1e8a-570d-e41dbe6ddf5c@amsat.org>
On 4/14/21 12:10 PM, Philippe Mathieu-Daudé wrote:
> On 3/19/21 6:40 AM, Thomas Huth wrote:
>> On 19/03/2021 01.43, Philippe Mathieu-Daudé wrote:
>>> When a job is based on a Docker image [1], or is using a Docker
>>> service, it requires a runner with Docker installed.
>>>
>>> Gitlab shared runners provide the 'docker' tag when they have it
>>> installed.
>>>
>>> Are Gitlab shared runners are limited resources, we'd like to
>>
>> s/Are/As/
>>
>>> add more runners to QEMU repositories hosted on Gitlab. If a
>>> runner doesn't provide Docker, our jobs requiring it will fail.
>>>
>>> Use the standard 'docker' tag to mark the jobs requiring Docker
>>> on the runner.
>>>
>>> [1] https://docs.gitlab.com/ee/ci/yaml/#image
>>> [2] https://docs.gitlab.com/ee/ci/yaml/#services
>>>
>>> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
>> [...]
>>> diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
>>> index f65cb11c4d3..d4511cf7dea 100644
>>> --- a/.gitlab-ci.yml
>>> +++ b/.gitlab-ci.yml
>>> @@ -14,6 +14,8 @@ include:
>>> - local: '/.gitlab-ci.d/crossbuilds.yml'
>>> .native_build_job_template: &native_build_job_definition
>>> + tags:
>>> + - docker
>>> stage: build
>>> image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:latest
>>> before_script:
>>> @@ -38,6 +40,8 @@ include:
>>> fi
>>> .native_test_job_template: &native_test_job_definition
>>> + tags:
>>> + - docker
>>> stage: test
>>> image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:latest
>>> script:
>>
>> If you add it to the templates ... won't this disable most of the jobs
>> on the dedicated runners that don't have docker? Wouldn't it be better
>> to add the tag only to the jobs that run "make check-tcg" ?
>
> But this is the point, if a runner doesn't have Docker, it can not
> run the job...
Apparently gitlab isn't clever enough to figure the 'image:' tag implies
we are expecting Docker... I suppose they wanted to keep it simple and
filter with runner tags.
Now the public runners are named 'gitlab-org-docker', see:
https://gitlab.com/gitlab-org/gitlab-ui/-/merge_requests/1267/diffs
https://gitlab.com/gitlab-org/gitlab-docs/-/merge_requests/800/diffs
https://gitlab.com/gitlab-org/gitlab-docs/blob/master/.gitlab-ci.yml#L483
https://gitlab.com/gitlab-com/gl-infra/infrastructure/-/issues/9685
Long term it would be simpler if we use gitlab recommended templates,
so we don't have to update ours when they change.
Meanwhile I'll simpy respin using 'gitlab-org-docker'.
Regards,
Phil.
prev parent reply other threads:[~2021-05-10 14:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-19 0:43 [PATCH] gitlab-ci: Restrict jobs using Docker to runners having 'docker' tag Philippe Mathieu-Daudé
2021-03-19 5:40 ` Thomas Huth
2021-03-19 14:51 ` Laszlo Ersek
2021-04-14 10:10 ` Philippe Mathieu-Daudé
2021-05-10 14:53 ` Philippe Mathieu-Daudé [this message]
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=6ece59c7-6e1c-245d-6b65-93dd374b6810@amsat.org \
--to=f4bug@amsat.org \
--cc=alex.bennee@linaro.org \
--cc=berrange@redhat.com \
--cc=bmeng.cn@gmail.com \
--cc=crosa@redhat.com \
--cc=lersek@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=thuth@redhat.com \
--cc=wainersm@redhat.com \
--cc=willianr@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).