diff mbox series

[6/6] automation: switch to multi-platform images when possible

Message ID 20231116121310.72210-7-roger.pau@citrix.com (mailing list archive)
State Superseded
Headers show
Series automation: minor fixes and improvements | expand

Commit Message

Roger Pau Monne Nov. 16, 2023, 12:13 p.m. UTC
Instead of using specific architecture image, switch to using multi-arch ones
and specify the desired architecture using the --platform option.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
---
I haven't touched the Yocto dockerfile because I'm not sure how it's used.
---
 automation/build/alpine/3.18-arm64v8.dockerfile               | 2 +-
 automation/build/debian/bookworm-arm64v8-arm32-gcc.dockerfile | 2 +-
 automation/build/debian/bookworm-arm64v8.dockerfile           | 2 +-
 automation/build/debian/bookworm-cppcheck.dockerfile          | 2 +-
 automation/build/debian/bookworm-i386.dockerfile              | 2 +-
 automation/build/debian/stretch-i386.dockerfile               | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

Comments

Stefano Stabellini Nov. 17, 2023, 1:14 a.m. UTC | #1
On Thu, 16 Nov 2023, Roger Pau Monne wrote:
> Instead of using specific architecture image, switch to using multi-arch ones
> and specify the desired architecture using the --platform option.
> 
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> ---
> I haven't touched the Yocto dockerfile because I'm not sure how it's used.

We are missing:

automation/build/debian/buster-gcc-ibt.dockerfile
automation/build/debian/bookworm-cppcheck.dockerfile
automation/tests-artifacts/*

Aside from that, it is fine.

How did you test the updated containers? Have you already pushed them to
the registry?


> ---
>  automation/build/alpine/3.18-arm64v8.dockerfile               | 2 +-
>  automation/build/debian/bookworm-arm64v8-arm32-gcc.dockerfile | 2 +-
>  automation/build/debian/bookworm-arm64v8.dockerfile           | 2 +-
>  automation/build/debian/bookworm-cppcheck.dockerfile          | 2 +-
>  automation/build/debian/bookworm-i386.dockerfile              | 2 +-
>  automation/build/debian/stretch-i386.dockerfile               | 2 +-
>  6 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/automation/build/alpine/3.18-arm64v8.dockerfile b/automation/build/alpine/3.18-arm64v8.dockerfile
> index 470f5d72a921..91e90220240f 100644
> --- a/automation/build/alpine/3.18-arm64v8.dockerfile
> +++ b/automation/build/alpine/3.18-arm64v8.dockerfile
> @@ -1,4 +1,4 @@
> -FROM arm64v8/alpine:3.18
> +FROM --platform=linux/arm64/v8 alpine:3.18
>  LABEL maintainer.name="The Xen Project" \
>        maintainer.email="xen-devel@lists.xenproject.org"
>  
> diff --git a/automation/build/debian/bookworm-arm64v8-arm32-gcc.dockerfile b/automation/build/debian/bookworm-arm64v8-arm32-gcc.dockerfile
> index b3295c435ed5..a05ffeac04f9 100644
> --- a/automation/build/debian/bookworm-arm64v8-arm32-gcc.dockerfile
> +++ b/automation/build/debian/bookworm-arm64v8-arm32-gcc.dockerfile
> @@ -1,4 +1,4 @@
> -FROM arm64v8/debian:bookworm
> +FROM --platform=linux/arm64/v8 debian:bookworm
>  LABEL maintainer.name="The Xen Project" \
>        maintainer.email="xen-devel@lists.xenproject.org"
>  
> diff --git a/automation/build/debian/bookworm-arm64v8.dockerfile b/automation/build/debian/bookworm-arm64v8.dockerfile
> index 640b1e0eadf2..2c432aacb765 100644
> --- a/automation/build/debian/bookworm-arm64v8.dockerfile
> +++ b/automation/build/debian/bookworm-arm64v8.dockerfile
> @@ -1,4 +1,4 @@
> -FROM arm64v8/debian:bookworm
> +FROM --platform=linux/arm64/v8 debian:bookworm
>  LABEL maintainer.name="The Xen Project" \
>        maintainer.email="xen-devel@lists.xenproject.org"
>  
> diff --git a/automation/build/debian/bookworm-cppcheck.dockerfile b/automation/build/debian/bookworm-cppcheck.dockerfile
> index d64fb7b18c66..d368d69472cb 100644
> --- a/automation/build/debian/bookworm-cppcheck.dockerfile
> +++ b/automation/build/debian/bookworm-cppcheck.dockerfile
> @@ -1,4 +1,4 @@
> -FROM arm64v8/debian:bookworm AS builder
> +FROM --platform=linux/arm64/v8 debian:bookworm AS builder
>  
>  ENV DEBIAN_FRONTEND=noninteractive
>  ENV CPPCHECK_VERSION=2.7
> diff --git a/automation/build/debian/bookworm-i386.dockerfile b/automation/build/debian/bookworm-i386.dockerfile
> index 559bf670f0f1..89a650338566 100644
> --- a/automation/build/debian/bookworm-i386.dockerfile
> +++ b/automation/build/debian/bookworm-i386.dockerfile
> @@ -1,4 +1,4 @@
> -FROM i386/debian:bookworm
> +FROM --platform=linux/i386 debian:bookworm
>  LABEL maintainer.name="The Xen Project" \
>        maintainer.email="xen-devel@lists.xenproject.org"
>  
> diff --git a/automation/build/debian/stretch-i386.dockerfile b/automation/build/debian/stretch-i386.dockerfile
> index 9739651e25dd..da93fed8ea68 100644
> --- a/automation/build/debian/stretch-i386.dockerfile
> +++ b/automation/build/debian/stretch-i386.dockerfile
> @@ -1,4 +1,4 @@
> -FROM i386/debian:stretch
> +FROM --platform=linux/i386 debian:stretch
>  LABEL maintainer.name="The Xen Project" \
>        maintainer.email="xen-devel@lists.xenproject.org"
>  
> -- 
> 2.42.0
>
Roger Pau Monne Nov. 17, 2023, 10:15 a.m. UTC | #2
On Thu, Nov 16, 2023 at 05:14:23PM -0800, Stefano Stabellini wrote:
> On Thu, 16 Nov 2023, Roger Pau Monne wrote:
> > Instead of using specific architecture image, switch to using multi-arch ones
> > and specify the desired architecture using the --platform option.
> > 
> > Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> > ---
> > I haven't touched the Yocto dockerfile because I'm not sure how it's used.
> 
> We are missing:
> 
> automation/build/debian/buster-gcc-ibt.dockerfile

That file was updated in patch 5/6:

https://lore.kernel.org/xen-devel/20231116121310.72210-6-roger.pau@citrix.com/

> automation/build/debian/bookworm-cppcheck.dockerfile

Not sure I'm following, bookworm-cppcheck.dockerfile is updated...

> automation/tests-artifacts/*

Oh, didn't realize about those, I will do in a separate patch.

> Aside from that, it is fine.
> 
> How did you test the updated containers? Have you already pushed them to
> the registry?

I've pushed them to my local registry and changed the registry in one
of my Xen branches, see:

https://gitlab.com/xen-project/people/royger/xen/-/pipelines/1074512137

Some jobs failed because the runners run out of space.

Thanks, Roger.
Stefano Stabellini Nov. 18, 2023, 2:27 a.m. UTC | #3
On Fri, 17 Nov 2023, Roger Pau Monné wrote:
> On Thu, Nov 16, 2023 at 05:14:23PM -0800, Stefano Stabellini wrote:
> > On Thu, 16 Nov 2023, Roger Pau Monne wrote:
> > > Instead of using specific architecture image, switch to using multi-arch ones
> > > and specify the desired architecture using the --platform option.
> > > 
> > > Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> > > ---
> > > I haven't touched the Yocto dockerfile because I'm not sure how it's used.
> > 
> > We are missing:
> > 
> > automation/build/debian/buster-gcc-ibt.dockerfile
> 
> That file was updated in patch 5/6:
> 
> https://lore.kernel.org/xen-devel/20231116121310.72210-6-roger.pau@citrix.com/
> 
> > automation/build/debian/bookworm-cppcheck.dockerfile
> 
> Not sure I'm following, bookworm-cppcheck.dockerfile is updated...
> 
> > automation/tests-artifacts/*
> 
> Oh, didn't realize about those, I will do in a separate patch.

Thanks!


> > Aside from that, it is fine.
> > 
> > How did you test the updated containers? Have you already pushed them to
> > the registry?
> 
> I've pushed them to my local registry and changed the registry in one
> of my Xen branches, see:
> 
> https://gitlab.com/xen-project/people/royger/xen/-/pipelines/1074512137
> 
> Some jobs failed because the runners run out of space.

Oh, OK. It is going to be a lot of work to rebuild and push all the
containers and I wouldn't mind you doing that once the patches are
acked. In fact it would be great if you pushed the containers once you
tests that they work as expected. If you don't have the right access
permissions, I can do that too
Roger Pau Monne Nov. 20, 2023, 11:19 a.m. UTC | #4
On Fri, Nov 17, 2023 at 06:27:50PM -0800, Stefano Stabellini wrote:
> On Fri, 17 Nov 2023, Roger Pau Monné wrote:
> > On Thu, Nov 16, 2023 at 05:14:23PM -0800, Stefano Stabellini wrote:
> > > On Thu, 16 Nov 2023, Roger Pau Monne wrote:
> > > > Instead of using specific architecture image, switch to using multi-arch ones
> > > > and specify the desired architecture using the --platform option.
> > > > 
> > > > Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> > > > ---
> > > > I haven't touched the Yocto dockerfile because I'm not sure how it's used.
> > > 
> > > We are missing:
> > > 
> > > automation/build/debian/buster-gcc-ibt.dockerfile
> > 
> > That file was updated in patch 5/6:
> > 
> > https://lore.kernel.org/xen-devel/20231116121310.72210-6-roger.pau@citrix.com/
> > 
> > > automation/build/debian/bookworm-cppcheck.dockerfile
> > 
> > Not sure I'm following, bookworm-cppcheck.dockerfile is updated...
> > 
> > > automation/tests-artifacts/*
> > 
> > Oh, didn't realize about those, I will do in a separate patch.
> 
> Thanks!
> 
> 
> > > Aside from that, it is fine.
> > > 
> > > How did you test the updated containers? Have you already pushed them to
> > > the registry?
> > 
> > I've pushed them to my local registry and changed the registry in one
> > of my Xen branches, see:
> > 
> > https://gitlab.com/xen-project/people/royger/xen/-/pipelines/1074512137
> > 
> > Some jobs failed because the runners run out of space.
> 
> Oh, OK. It is going to be a lot of work to rebuild and push all the
> containers and I wouldn't mind you doing that once the patches are
> acked. In fact it would be great if you pushed the containers once you
> tests that they work as expected. If you don't have the right access
> permissions, I can do that too

For the patches only the x86 bookworm container needs to be rebuild in
order to contain the packages required by the test step.

The rest can be updated either before or after the series has been
committed.

Thanks, Roger.
diff mbox series

Patch

diff --git a/automation/build/alpine/3.18-arm64v8.dockerfile b/automation/build/alpine/3.18-arm64v8.dockerfile
index 470f5d72a921..91e90220240f 100644
--- a/automation/build/alpine/3.18-arm64v8.dockerfile
+++ b/automation/build/alpine/3.18-arm64v8.dockerfile
@@ -1,4 +1,4 @@ 
-FROM arm64v8/alpine:3.18
+FROM --platform=linux/arm64/v8 alpine:3.18
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="xen-devel@lists.xenproject.org"
 
diff --git a/automation/build/debian/bookworm-arm64v8-arm32-gcc.dockerfile b/automation/build/debian/bookworm-arm64v8-arm32-gcc.dockerfile
index b3295c435ed5..a05ffeac04f9 100644
--- a/automation/build/debian/bookworm-arm64v8-arm32-gcc.dockerfile
+++ b/automation/build/debian/bookworm-arm64v8-arm32-gcc.dockerfile
@@ -1,4 +1,4 @@ 
-FROM arm64v8/debian:bookworm
+FROM --platform=linux/arm64/v8 debian:bookworm
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="xen-devel@lists.xenproject.org"
 
diff --git a/automation/build/debian/bookworm-arm64v8.dockerfile b/automation/build/debian/bookworm-arm64v8.dockerfile
index 640b1e0eadf2..2c432aacb765 100644
--- a/automation/build/debian/bookworm-arm64v8.dockerfile
+++ b/automation/build/debian/bookworm-arm64v8.dockerfile
@@ -1,4 +1,4 @@ 
-FROM arm64v8/debian:bookworm
+FROM --platform=linux/arm64/v8 debian:bookworm
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="xen-devel@lists.xenproject.org"
 
diff --git a/automation/build/debian/bookworm-cppcheck.dockerfile b/automation/build/debian/bookworm-cppcheck.dockerfile
index d64fb7b18c66..d368d69472cb 100644
--- a/automation/build/debian/bookworm-cppcheck.dockerfile
+++ b/automation/build/debian/bookworm-cppcheck.dockerfile
@@ -1,4 +1,4 @@ 
-FROM arm64v8/debian:bookworm AS builder
+FROM --platform=linux/arm64/v8 debian:bookworm AS builder
 
 ENV DEBIAN_FRONTEND=noninteractive
 ENV CPPCHECK_VERSION=2.7
diff --git a/automation/build/debian/bookworm-i386.dockerfile b/automation/build/debian/bookworm-i386.dockerfile
index 559bf670f0f1..89a650338566 100644
--- a/automation/build/debian/bookworm-i386.dockerfile
+++ b/automation/build/debian/bookworm-i386.dockerfile
@@ -1,4 +1,4 @@ 
-FROM i386/debian:bookworm
+FROM --platform=linux/i386 debian:bookworm
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="xen-devel@lists.xenproject.org"
 
diff --git a/automation/build/debian/stretch-i386.dockerfile b/automation/build/debian/stretch-i386.dockerfile
index 9739651e25dd..da93fed8ea68 100644
--- a/automation/build/debian/stretch-i386.dockerfile
+++ b/automation/build/debian/stretch-i386.dockerfile
@@ -1,4 +1,4 @@ 
-FROM i386/debian:stretch
+FROM --platform=linux/i386 debian:stretch
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="xen-devel@lists.xenproject.org"