Build 2024.2 libvirt images

- Stop building Ubuntu Focal based image
- Do not install qemu-kvm (not provided in Jammy and Noble)
- Ignore error if can not install qemu-efi (provided in Jammy
  but not in Noble)

Change-Id: Ib74326730f337df80017144a35b66fb496d8f58e
This commit is contained in:
Vladimir Kozhukalov 2024-10-09 21:16:38 -05:00
parent 9941ab3d45
commit 1c7c6aa7b9
2 changed files with 20 additions and 12 deletions

View File

@ -14,18 +14,15 @@ EOF
ARG RELEASE
RUN <<EOF /bin/bash
set -xe
if [ "$(lsb_release -sc)" = "focal" ]; then
if [[ "${RELEASE}" = "wallaby" || "${RELEASE}" = "xena" || "${RELEASE}" = "yoga" ]]; then
if [ "$(lsb_release -sc)" = "jammy" ]; then
if [[ "${RELEASE}" = "antelope" || "${RELEASE}" = "bobcat" || "${RELEASE}" = "caracal" ]]; then
echo "deb http://ubuntu-cloud.archive.canonical.com/ubuntu $(lsb_release -sc)-updates/${RELEASE} main" > /etc/apt/sources.list.d/cloudarchive.list
else
echo "${RELEASE} is not supported on $(lsb_release -sc)"
exit 1
fi
elif [ "$(lsb_release -sc)" = "jammy" ]; then
if [[ "${RELEASE}" = "yoga" ]]; then
# NOTE(mnaser): Yoga shipped with 22.04, so no need to add an extra repository.
echo "" > /etc/apt/sources.list.d/cloudarchive.list
elif [[ "${RELEASE}" = "zed" || "${RELEASE}" = "antelope" || "${RELEASE}" = "bobcat" || "${RELEASE}" = "caracal" ]]; then
elif [ "$(lsb_release -sc)" = "noble" ]; then
if [[ "${RELEASE}" = "dalmatian" ]]; then
echo "deb http://ubuntu-cloud.archive.canonical.com/ubuntu $(lsb_release -sc)-updates/${RELEASE} main" > /etc/apt/sources.list.d/cloudarchive.list
else
echo "${RELEASE} is not supported on $(lsb_release -sc)"
@ -58,9 +55,9 @@ RUN <<EOF
ovmf \
pm-utils \
qemu-system \
qemu-block-extra \
qemu-efi \
qemu-kvm
qemu-block-extra
# There is no qemu-efi in Ubuntu Noble
apt-get install -y --no-install-recommends qemu-efi || true
apt-get clean
rm -rf /var/lib/apt/lists/*
EOF

View File

@ -68,7 +68,6 @@
- "bobcat-ubuntu_jammy"
- "2023.2-ubuntu_jammy-{{ currentdate }}"
- "2023.2-ubuntu_jammy"
- "latest"
build_args:
- FROM=ubuntu:jammy
- RELEASE=bobcat
@ -82,10 +81,22 @@
- "caracal-ubuntu_jammy"
- "2024.1-ubuntu_jammy-{{ currentdate }}"
- "2024.1-ubuntu_jammy"
- "latest"
build_args:
- FROM=ubuntu:jammy
- RELEASE=caracal
- context: libvirt
repository: openstackhelm/libvirt
dockerfile: Dockerfile
arch:
- linux/amd64
tags:
- "dalmatian-ubuntu_noble-{{ currentdate }}"
- "dalmatian-ubuntu_noble"
- "2024.2-ubuntu_noble-{{ currentdate }}"
- "2024.2-ubuntu_noble"
build_args:
- FROM=ubuntu:noble
- RELEASE=dalmatian
files: &libvirt_files
- libvirt/.*
- zuul.d/libvirt.yaml