From 87f163939c9d2ef769d928c1be925191a6438f9bd0cfbf07f1d375be9868e4cc Mon Sep 17 00:00:00 2001 From: Nicolas Belouin Date: Tue, 10 Jun 2025 10:59:50 +0200 Subject: [PATCH] kiwi-builder-image: Remove failure if package version mismatch Remove the automatic failure if repo package and base image are mismatched. This is needed to prevent automation from failing when updated base image doesn't exists. Signed-off-by: Nicolas Belouin --- kiwi-builder-image/Dockerfile | 12 +++++------- kiwi-builder-image/_service | 18 +----------------- 2 files changed, 6 insertions(+), 24 deletions(-) diff --git a/kiwi-builder-image/Dockerfile b/kiwi-builder-image/Dockerfile index d220bea..19df2bf 100644 --- a/kiwi-builder-image/Dockerfile +++ b/kiwi-builder-image/Dockerfile @@ -1,6 +1,7 @@ -#!BuildTag: %%IMG_PREFIX%%kiwi-builder:%%kiwi_version%%.0-%RELEASE% -#!BuildTag: %%IMG_PREFIX%%kiwi-builder:%%kiwi_version%%.0 +#!BuildTag: %%IMG_PREFIX%%kiwi-builder:10.2.12.0-%RELEASE% +#!BuildTag: %%IMG_PREFIX%%kiwi-builder:10.2.12.0 +# Base image version, should match the tag above ARG KIWIVERSION="10.2.12" FROM registry.suse.com/bci/kiwi:${KIWIVERSION} ARG KIWIVERSION @@ -10,11 +11,11 @@ ARG KIWIVERSION LABEL org.opencontainers.image.authors="SUSE LLC (https://www.suse.com/)" LABEL org.opencontainers.image.title="SLE Kiwi Builder Container Image" LABEL org.opencontainers.image.description="kiwi-builder based on the SLE Base Container Image." -LABEL org.opencontainers.image.version="%%kiwi_version%%" +LABEL org.opencontainers.image.version="${KIWIVERSION}" LABEL org.opencontainers.image.url="https://www.suse.com/solutions/edge-computing/" LABEL org.opencontainers.image.created="%BUILDTIME%" LABEL org.opencontainers.image.vendor="SUSE LLC" -LABEL org.opensuse.reference="%%IMG_REPO%%/%%IMG_PREFIX%%kiwi-builder:%%kiwi_version%%.0-%RELEASE%" +LABEL org.opensuse.reference="%%IMG_REPO%%/%%IMG_PREFIX%%kiwi-builder:${KIWIVERSION}.0-%RELEASE%" LABEL org.openbuildservice.disturl="%DISTURL%" LABEL com.suse.supportlevel="%%SUPPORT_LEVEL%%" LABEL com.suse.eula="SUSE Combined EULA February 2024" @@ -23,9 +24,6 @@ LABEL com.suse.image-type="application" LABEL com.suse.release-stage="released" # endlabelprefix -# help the build service understand the need for python3-kiwi -RUN zypper -n install -d -D python3-kiwi; [ "%%kiwi_version%%" = "${KIWIVERSION}" ] || { echo "expected kiwi version ${KIWIVERSION}: version mismatch"; exit 1; } - # Copy build script into image and make it executable ADD build-image.sh /usr/bin/build-image RUN chmod a+x /usr/bin/build-image diff --git a/kiwi-builder-image/_service b/kiwi-builder-image/_service index 254ee27..4a91d53 100644 --- a/kiwi-builder-image/_service +++ b/kiwi-builder-image/_service @@ -1,15 +1,9 @@ - - README - IMG_REPO=$(rpm --macros=/root/.rpmmacros -E %img_repo) - IMG_REPO - IMG_PREFIX=$(rpm --macros=/root/.rpmmacros -E %{?img_prefix}) - IMG_PREFIX - Dockerfile + README IMG_PREFIX=$(rpm --macros=/root/.rpmmacros -E %{?img_prefix}) IMG_PREFIX IMG_REPO=$(rpm --macros=/root/.rpmmacros -E %img_repo) @@ -17,14 +11,4 @@ SUPPORT_LEVEL=$(rpm --macros=/root/.rpmmacros -E %support_level) SUPPORT_LEVEL - - Dockerfile - %%kiwi_version%% - python3-kiwi - - - README - %%kiwi_version%% - python3-kiwi - -- 2.49.0