* Help adding package to gitlab runners
@ 2021-09-13 1:14 Jag Raman
2021-09-13 5:38 ` Thomas Huth
0 siblings, 1 reply; 3+ messages in thread
From: Jag Raman @ 2021-09-13 1:14 UTC (permalink / raw)
To: qemu-devel
Cc: Thomas Huth, f4bug, Wainer dos Santos Moschetta,
Willian Rampazzo, Stefan Hajnoczi, Cleber Rosa, Alex Bennée
Hi,
I'm wondering about the best way to install a dependency package on
GitLab runners.
I'm adding libvfio-user [1] as a submodule to QEMU. libvfio-user depends
on the availability of the "json-c" package. As such, we need to install this
package to build the library as part of QEMU.
I saw that we could add a "before_script" section to the jobs in
".gitlab-ci.d/buildtest.yml" - this section could have commands to install the
"json-c" package before running the job. However, this option is specific to
a job.
I wonder if there is a way to do this for all jobs. I saw that
"scripts/ci/setup/build-environment.yml" has a list of packages needed to
build QEMU - this one seems Ubuntu-specific.
How long does it take for changes made to this file (build-environment.yml)
to propagate? Are all QEMU's GitLab runners Ubuntu-based?
Thank you very much!
--
Jag
[1]: https://github.com/nutanix/libvfio-user
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Help adding package to gitlab runners
2021-09-13 1:14 Help adding package to gitlab runners Jag Raman
@ 2021-09-13 5:38 ` Thomas Huth
2021-09-13 13:49 ` Jag Raman
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Huth @ 2021-09-13 5:38 UTC (permalink / raw)
To: Jag Raman, qemu-devel
Cc: f4bug, Wainer dos Santos Moschetta, Willian Rampazzo,
Stefan Hajnoczi, Cleber Rosa, Alex Bennée
On 13/09/2021 03.14, Jag Raman wrote:
> Hi,
>
> I'm wondering about the best way to install a dependency package on
> GitLab runners.
>
> I'm adding libvfio-user [1] as a submodule to QEMU. libvfio-user depends
> on the availability of the "json-c" package. As such, we need to install this
> package to build the library as part of QEMU.
>
> I saw that we could add a "before_script" section to the jobs in
> ".gitlab-ci.d/buildtest.yml" - this section could have commands to install the
> "json-c" package before running the job. However, this option is specific to
> a job.
>
> I wonder if there is a way to do this for all jobs. I saw that
> "scripts/ci/setup/build-environment.yml" has a list of packages needed to
> build QEMU - this one seems Ubuntu-specific.
>
> How long does it take for changes made to this file (build-environment.yml)
> to propagate? Are all QEMU's GitLab runners Ubuntu-based?
No, this file (build-environment.yml) is only used to prepare the non-shared
custom runners (see .gitlab-ci.d/custom-runners.yml), which only run on the
staging branch of the qemu-project (or if you supply your own non-x86 runners).
I think in your case, you likely want to modify the shared runners instead.
For this, we're using containers that are prepared in the first two stages
of the CI pipelines. You can modify the container definitions in
tests/docker/dockerfiles/. Once you add your package there, it should get
used directly the next time you push a branch with the modification to gitlab.
HTH,
Thomas
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Help adding package to gitlab runners
2021-09-13 5:38 ` Thomas Huth
@ 2021-09-13 13:49 ` Jag Raman
0 siblings, 0 replies; 3+ messages in thread
From: Jag Raman @ 2021-09-13 13:49 UTC (permalink / raw)
To: Thomas Huth
Cc: qemu-devel, Wainer dos Santos Moschetta, f4bug, Willian Rampazzo,
Stefan Hajnoczi, Cleber Rosa, Alex Bennée
> On Sep 13, 2021, at 1:38 AM, Thomas Huth <thuth@redhat.com> wrote:
>
> On 13/09/2021 03.14, Jag Raman wrote:
>> Hi,
>> I'm wondering about the best way to install a dependency package on
>> GitLab runners.
>>
>> I'm adding libvfio-user [1] as a submodule to QEMU. libvfio-user depends
>> on the availability of the "json-c" package. As such, we need to install this
>> package to build the library as part of QEMU.
>> I saw that we could add a "before_script" section to the jobs in
>> ".gitlab-ci.d/buildtest.yml" - this section could have commands to install the
>> "json-c" package before running the job. However, this option is specific to
>> a job.
>> I wonder if there is a way to do this for all jobs. I saw that
>> "scripts/ci/setup/build-environment.yml" has a list of packages needed to
>> build QEMU - this one seems Ubuntu-specific.
>> How long does it take for changes made to this file (build-environment.yml)
>> to propagate? Are all QEMU's GitLab runners Ubuntu-based?
>
> No, this file (build-environment.yml) is only used to prepare the non-shared custom runners (see .gitlab-ci.d/custom-runners.yml), which only run on the staging branch of the qemu-project (or if you supply your own non-x86 runners).
>
> I think in your case, you likely want to modify the shared runners instead. For this, we're using containers that are prepared in the first two stages of the CI pipelines. You can modify the container definitions in tests/docker/dockerfiles/. Once you add your package there, it should get used directly the next time you push a branch with the modification to gitlab.
Thank you for confirming, Thomas! :)
--
Jag
>
> HTH,
> Thomas
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-09-13 14:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-13 1:14 Help adding package to gitlab runners Jag Raman
2021-09-13 5:38 ` Thomas Huth
2021-09-13 13:49 ` Jag Raman
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).