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

View File

@ -68,7 +68,6 @@
- "bobcat-ubuntu_jammy" - "bobcat-ubuntu_jammy"
- "2023.2-ubuntu_jammy-{{ currentdate }}" - "2023.2-ubuntu_jammy-{{ currentdate }}"
- "2023.2-ubuntu_jammy" - "2023.2-ubuntu_jammy"
- "latest"
build_args: build_args:
- FROM=ubuntu:jammy - FROM=ubuntu:jammy
- RELEASE=bobcat - RELEASE=bobcat
@ -82,10 +81,22 @@
- "caracal-ubuntu_jammy" - "caracal-ubuntu_jammy"
- "2024.1-ubuntu_jammy-{{ currentdate }}" - "2024.1-ubuntu_jammy-{{ currentdate }}"
- "2024.1-ubuntu_jammy" - "2024.1-ubuntu_jammy"
- "latest"
build_args: build_args:
- FROM=ubuntu:jammy - FROM=ubuntu:jammy
- RELEASE=caracal - 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 files: &libvirt_files
- libvirt/.* - libvirt/.*
- zuul.d/libvirt.yaml - zuul.d/libvirt.yaml