From 64c4be021918e12eb8e9142e3c370e0b18e416aa Mon Sep 17 00:00:00 2001 From: Kevin Carter Date: Thu, 2 May 2024 20:00:24 -0500 Subject: [PATCH] feat: add oslo db dependency into nova-efi Related-Fix: https://github.com/openstack/oslo.db/commit/be0515daa260811ad77b5eb5b78670c77eda2df6 Co-Authored-By Luke Repko Signed-off-by: Kevin Carter --- .github/workflows/release-nova-uefi.yml | 10 ++++++++++ Containerfiles/NovaEFI-Containerfile | 8 ++++++++ 2 files changed, 18 insertions(+) diff --git a/.github/workflows/release-nova-uefi.yml b/.github/workflows/release-nova-uefi.yml index a4e81060c..2dfea8b02 100644 --- a/.github/workflows/release-nova-uefi.yml +++ b/.github/workflows/release-nova-uefi.yml @@ -14,6 +14,15 @@ on: - master-ubuntu_jammy - 2023.1-ubuntu_jammy - 2023.2-ubuntu_jammy + pluginTag: + description: 'Set release used for the build environment' + required: true + default: 'master' + type: choice + options: + - "master" + - "2023.1" + - "2023.2" # Defines two custom environment variables for the workflow. These are used for the Container registry domain, and a name for the Docker image that this workflow builds. env: @@ -61,3 +70,4 @@ jobs: labels: ${{ steps.meta.outputs.labels }} build-args: | VERSION=${{ github.event.inputs.imageTag }} + PLUGIN_VERSION=${{ github.event.inputs.pluginTag }} diff --git a/Containerfiles/NovaEFI-Containerfile b/Containerfiles/NovaEFI-Containerfile index c88c2e5b4..986eba495 100644 --- a/Containerfiles/NovaEFI-Containerfile +++ b/Containerfiles/NovaEFI-Containerfile @@ -10,3 +10,11 @@ RUN apt update && apt install -y ovmf open-iscsi multipath-tools libgirepository rm -rf /var/cache/apt/archives /var/lib/apt/lists; \ apt clean; /var/lib/openstack/bin/pip install pygobject; \ find /var/lib/openstack -regex '^.*\(__pycache__\|\.py[co]\)$' -delete +RUN export ORIG_PLUGIN_VERSION="${PLUGIN_VERSION}"; \ +if [ "${PLUGIN_VERSION}" != 'master' ]; then export PLUGIN_VERSION=stable/${PLUGIN_VERSION}; fi; \ +. /var/lib/openstack/bin/activate; \ +/var/lib/openstack/bin/pip install --constraint=https://releases.openstack.org/constraints/upper/${ORIG_PLUGIN_VERSION} \ + git+https://github.com/openstack/oslo.db@${PLUGIN_VERSION}#egg=oslo_db + +FROM openstackhelm/nova:${VERSION} +COPY --from=build /var/lib/openstack/. /var/lib/openstack/