Skip to contentSkip to conversation

CI improvements

PATCH In review Michal Orzel 2 participants 5 messages Nov 17, 2022 – Nov 18, 2022

lore
Share & tools
lore
#0 lore raw

cover CI improvements

This patch series moves the installation of packages at runtime from the test scripts into the respective containers.

This series is based on the CI next branch:
https://gitlab.com/xen-project/people/sstabellini/xen/-/tree/next

Michal Orzel (2):
automation: Install packages required by tests in containers
automation: Remove installation of packages from test scripts

 automation/build/debian/stretch.dockerfile          | 3 +++
 automation/build/debian/unstable-arm64v8.dockerfile | 7 +++++++
 automation/scripts/qemu-alpine-x86_64.sh            | 4 ----
 automation/scripts/qemu-smoke-dom0-arm32.sh         | 8 --------
 automation/scripts/qemu-smoke-dom0-arm64.sh         | 9 ---------
 automation/scripts/qemu-smoke-dom0less-arm64.sh     | 9 ---------
 6 files changed, 10 insertions(+), 30 deletions(-)
Signature · 1 line
2.25.1
#1 lore raw

PATCH 1/2 automation: Install packages required by tests in containers

Installation of additional packages from the test scripts when running the tests has some drawbacks. It is slower than cloning containers and can fail due to some network issues (apparently it often happens on x86 rackspace). This patch is adding the packages required by the tests to be installed when building the containers.

From qemu-alpine-x86_64.sh into debian:stretch:
- cpio,
- busybox-static.

From qemu-smoke-*-{arm,arm64}.sh into debian:unstable-arm64v8:
- u-boot-qemu,
- u-boot-tools,
- device-tree-compiler,
- curl,
- cpio,
- busybox-static.

The follow-up patch will remove installation of these packages from the test scripts. This is done in order not to break the CI in-between.

---
 automation/build/debian/stretch.dockerfile          | 3 +++
 automation/build/debian/unstable-arm64v8.dockerfile | 7 +++++++
 2 files changed, 10 insertions(+)
automation/build/debian/stretch.dockerfile +3 -0
index da6aa874dd70..30fcc5288dee 100644
@@ -49,6 +49,9 @@ RUN apt-get update && \
         apt-transport-https \
         # for test phase, qemu-smoke-* jobs
         qemu-system-x86 \
+        # for test phase, qemu-alpine-* jobs
+        cpio \
+        busybox-static \
         && \
         apt-get autoremove -y && \
         apt-get clean && \
automation/build/debian/unstable-arm64v8.dockerfile +7 -0
index 5c73458d9d19..0080c22ba21f 100644
@@ -43,6 +43,13 @@ RUN apt-get update && \
         wget \
         git \
         nasm \
+        # for test phase, qemu-smoke-* jobs
+        u-boot-qemu \
+        u-boot-tools \
+        device-tree-compiler \
+        curl \
+        cpio \
+        busybox-static \
         && \
         apt-get autoremove -y && \
         apt-get clean && \
Signature · 1 line
2.25.1
Reviewed-by on v1 1/2
#2 lore raw

Re: [PATCH 1/2] automation: Install packages required by tests in containers

Quoted 18 lines · Michal Orzel

Installation of additional packages from the test scripts when running the tests has some drawbacks. It is slower than cloning containers and can fail due to some network issues (apparently it often happens on x86 rackspace). This patch is adding the packages required by the tests to be installed when building the containers.

Quoted 1 line

From qemu-alpine-x86_64.sh into debian:stretch:

- cpio,
- busybox-static.

Quoted 1 line

From qemu-smoke-*-{arm,arm64}.sh into debian:unstable-arm64v8:

- u-boot-qemu,
- u-boot-tools,
- device-tree-compiler,
- curl,
- cpio,
- busybox-static.

Quoted 4 lines

The follow-up patch will remove installation of these packages from the test scripts. This is done in order not to break the CI in-between.

Quoted 40 lines
---
 automation/build/debian/stretch.dockerfile          | 3 +++
 automation/build/debian/unstable-arm64v8.dockerfile | 7 +++++++
 2 files changed, 10 insertions(+)
automation/build/debian/stretch.dockerfile +3 -0
index da6aa874dd70..30fcc5288dee 100644
@@ -49,6 +49,9 @@ RUN apt-get update && \
         apt-transport-https \
         # for test phase, qemu-smoke-* jobs
         qemu-system-x86 \
+        # for test phase, qemu-alpine-* jobs
+        cpio \
+        busybox-static \
         && \
         apt-get autoremove -y && \
         apt-get clean && \
automation/build/debian/unstable-arm64v8.dockerfile +7 -0
index 5c73458d9d19..0080c22ba21f 100644
@@ -43,6 +43,13 @@ RUN apt-get update && \
         wget \
         git \
         nasm \
+        # for test phase, qemu-smoke-* jobs
+        u-boot-qemu \
+        u-boot-tools \
+        device-tree-compiler \
+        curl \
+        cpio \
+        busybox-static \
         && \
         apt-get autoremove -y && \
         apt-get clean && \
Signature · 1 line
2.25.1
#3 lore raw

PATCH 2/2 automation: Remove installation of packages from test scripts

In reply to Michal Orzel

Now, when these packages are already installed in the respective containers, we can remove them from the test scripts.

---
 automation/scripts/qemu-alpine-x86_64.sh        | 4 ----
 automation/scripts/qemu-smoke-dom0-arm32.sh     | 8 --------
 automation/scripts/qemu-smoke-dom0-arm64.sh     | 9 ---------
 automation/scripts/qemu-smoke-dom0less-arm64.sh | 9 ---------
 4 files changed, 30 deletions(-)
automation/scripts/qemu-alpine-x86_64.sh +0 -4
index 2e9625109c56..8c8d0b0cd759 100755
@@ -2,10 +2,6 @@
 
 set -ex
 
-apt-get -qy update
-apt-get -qy install --no-install-recommends cpio \
-                                            busybox-static
-
 # DomU Busybox
 cd binaries
 mkdir -p initrd
automation/scripts/qemu-smoke-dom0-arm32.sh +0 -8
index ef19b988c2c4..98e4d481f65c 100755
@@ -2,14 +2,6 @@
 
 set -ex
 
-export DEBIAN_FRONTEND=noninteractive
-apt-get -qy update
-apt-get -qy install --no-install-recommends u-boot-qemu \
-                                            u-boot-tools \
-                                            device-tree-compiler \
-                                            curl \
-                                            cpio
-
 cd binaries
 # Use the kernel from Debian
 curl --fail --silent --show-error --location --output vmlinuz http://http.us.debian.org/debian/dists/bullseye/main/installer-armhf/current/images/netboot/vmlinuz
automation/scripts/qemu-smoke-dom0-arm64.sh +0 -9
index 9004c537e325..0bf5cfdc61f9 100755
@@ -2,15 +2,6 @@
 
 set -ex
 
-export DEBIAN_FRONTEND=noninteractive
-apt-get -qy update
-apt-get -qy install --no-install-recommends u-boot-qemu \
-                                            u-boot-tools \
-                                            device-tree-compiler \
-                                            cpio \
-                                            curl \
-                                            busybox-static
-
 # DomU Busybox
 cd binaries
 mkdir -p initrd
automation/scripts/qemu-smoke-dom0less-arm64.sh +0 -9
index 933209e2e01e..2b59346fdcfd 100755
@@ -38,15 +38,6 @@ fi
 "
 fi
 
-export DEBIAN_FRONTEND=noninteractive
-apt-get -qy update
-apt-get -qy install --no-install-recommends u-boot-qemu \
-                                            u-boot-tools \
-                                            device-tree-compiler \
-                                            busybox-static \
-                                            cpio \
-                                            curl
-
 # XXX QEMU looks for "efi-virtio.rom" even if it is unneeded
 curl -fsSLO https://github.com/qemu/qemu/raw/v5.2.0/pc-bios/efi-virtio.rom
 ./binaries/qemu-system-aarch64 \
Signature · 1 line
2.25.1
Reviewed-by on v1 2/2
#4 lore raw

Re: [PATCH 2/2] automation: Remove installation of packages from test scripts

Quoted 4 lines · Michal Orzel

Now, when these packages are already installed in the respective containers, we can remove them from the test scripts.

Quoted 84 lines
---
 automation/scripts/qemu-alpine-x86_64.sh        | 4 ----
 automation/scripts/qemu-smoke-dom0-arm32.sh     | 8 --------
 automation/scripts/qemu-smoke-dom0-arm64.sh     | 9 ---------
 automation/scripts/qemu-smoke-dom0less-arm64.sh | 9 ---------
 4 files changed, 30 deletions(-)
automation/scripts/qemu-alpine-x86_64.sh +0 -4
index 2e9625109c56..8c8d0b0cd759 100755
@@ -2,10 +2,6 @@
 
 set -ex
 
-apt-get -qy update
-apt-get -qy install --no-install-recommends cpio \
-                                            busybox-static
-
 # DomU Busybox
 cd binaries
 mkdir -p initrd
automation/scripts/qemu-smoke-dom0-arm32.sh +0 -8
index ef19b988c2c4..98e4d481f65c 100755
@@ -2,14 +2,6 @@
 
 set -ex
 
-export DEBIAN_FRONTEND=noninteractive
-apt-get -qy update
-apt-get -qy install --no-install-recommends u-boot-qemu \
-                                            u-boot-tools \
-                                            device-tree-compiler \
-                                            curl \
-                                            cpio
-
 cd binaries
 # Use the kernel from Debian
 curl --fail --silent --show-error --location --output vmlinuz http://http.us.debian.org/debian/dists/bullseye/main/installer-armhf/current/images/netboot/vmlinuz
automation/scripts/qemu-smoke-dom0-arm64.sh +0 -9
index 9004c537e325..0bf5cfdc61f9 100755
@@ -2,15 +2,6 @@
 
 set -ex
 
-export DEBIAN_FRONTEND=noninteractive
-apt-get -qy update
-apt-get -qy install --no-install-recommends u-boot-qemu \
-                                            u-boot-tools \
-                                            device-tree-compiler \
-                                            cpio \
-                                            curl \
-                                            busybox-static
-
 # DomU Busybox
 cd binaries
 mkdir -p initrd
automation/scripts/qemu-smoke-dom0less-arm64.sh +0 -9
index 933209e2e01e..2b59346fdcfd 100755
@@ -38,15 +38,6 @@ fi
 "
 fi
 
-export DEBIAN_FRONTEND=noninteractive
-apt-get -qy update
-apt-get -qy install --no-install-recommends u-boot-qemu \
-                                            u-boot-tools \
-                                            device-tree-compiler \
-                                            busybox-static \
-                                            cpio \
-                                            curl
-
 # XXX QEMU looks for "efi-virtio.rom" even if it is unneeded
 curl -fsSLO https://github.com/qemu/qemu/raw/v5.2.0/pc-bios/efi-virtio.rom
 ./binaries/qemu-system-aarch64 \
Signature · 1 line
2.25.1