4 Commits

Author SHA256 Message Date
453f3564aa Merge pull request 'kiwi-builder-image: Remove failure if package version mismatch' (#190) from backport/kiwi-builder-image into 3.3
Reviewed-on: #190
Reviewed-by: Nicolas Belouin <nbelouin@noreply.src.opensuse.org>
2025-06-10 16:44:33 +02:00
421b511d19 kiwi-builder-image: Remove failure if package version mismatch
All checks were successful
Check Release Manifest Local Charts Versions / Check Release Manifest Local Charts Versions (pull_request) Successful in -1m20s
Build PR in OBS / Build PR in OBS (pull_request_target) Successful in -1m20s
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 <nicolas.belouin@suse.com>
2025-06-10 16:35:45 +02:00
1f1e6eae55 Merge pull request 'Fix issues with config and meta when releasing' (#191) from backport/config-issues into 3.3
All checks were successful
Synchronize Project Config / Update prjconf in OBS (push) Successful in 4s
Synchronize Project Metadata / sync-prj-meta (push) Successful in -1m18s
Reviewed-on: #191
Reviewed-by: Nicolas Belouin <nbelouin@noreply.src.opensuse.org>
2025-06-10 16:24:03 +02:00
d32507597f Fix issues with config and meta when releasing
Some checks failed
Synchronize Project Config / Update prjconf in OBS (push) Successful in -1m29s
Synchronize Project Metadata / sync-prj-meta (push) Successful in 11s
Check Release Manifest Local Charts Versions / Check Release Manifest Local Charts Versions (pull_request) Successful in 9s
Build PR in OBS / Build PR in OBS (pull_request_target) Failing after -11s
Signed-off-by: Nicolas Belouin <nicolas.belouin@suse.com>
2025-06-10 16:22:51 +02:00
4 changed files with 19 additions and 25 deletions

11
_config
View File

@ -108,7 +108,12 @@ BuildFlags: onlybuild:release-manifest-image
# Publish multi-arch container images only once all archs have been built
PublishFlags: archsync
# skopeo and umoci are used by build scripts to list packages
Substitute: system-packages:podman podman buildah createrepo_c release-compare skopeo umoci
%endif
%if "%_repository" == "images"
# skopeo and umoci are used by build scripts to list packages
Substitute: system-packages:podman podman buildah createrepo_c release-compare edge-build-checks skopeo umoci
@ -122,6 +127,8 @@ BuildFlags: onlybuild:release-manifest-image
Patterntype: none
BuildFlags: dockerarg:SLE_VERSION=16.0
BuildFlags: onlybuild:kiwi-builder-image
Substitute: system-packages:podman podman buildah createrepo_c release-compare skopeo umoci
# Publish multi-arch container images only once all archs have been built
PublishFlags: archsync
@ -140,7 +147,9 @@ BuildFlags: onlybuild:release-manifest-image
%endif
%else
BuildFlags: excludebuild:kiwi-builder-image
%if "%{sub %{reverse %_project} 1 7}" != "%{reverse :ToTest}" && "%{sub %{reverse %_project} 1 9}" != "%{reverse :Snapshot}"
BuildFlags: excludebuild:kiwi-builder-image
%endif
%endif

3
_meta
View File

@ -23,6 +23,9 @@
<disable/>
<enable repository="charts"/>
<enable repository="test_manifest_images"/>
{%- if for_release %}
<enable repository="releasecharts"/>
{%- endif %}
</build>
<publish>
<disable repository="phantomcharts"/>

View File

@ -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

View File

@ -1,15 +1,9 @@
<services>
<service mode="buildtime" name="kiwi_metainfo_helper"/>
<service name="docker_label_helper" mode="buildtime"/>
<service name="replace_using_env" mode="buildtime">
<param name="file">README</param>
<param name="eval">IMG_REPO=$(rpm --macros=/root/.rpmmacros -E %img_repo)</param>
<param name="var">IMG_REPO</param>
<param name="eval">IMG_PREFIX=$(rpm --macros=/root/.rpmmacros -E %{?img_prefix})</param>
<param name="var">IMG_PREFIX</param>
</service>
<service name="replace_using_env" mode="buildtime">
<param name="file">Dockerfile</param>
<param name="file">README</param>
<param name="eval">IMG_PREFIX=$(rpm --macros=/root/.rpmmacros -E %{?img_prefix})</param>
<param name="var">IMG_PREFIX</param>
<param name="eval">IMG_REPO=$(rpm --macros=/root/.rpmmacros -E %img_repo)</param>
@ -17,14 +11,4 @@
<param name="eval">SUPPORT_LEVEL=$(rpm --macros=/root/.rpmmacros -E %support_level)</param>
<param name="var">SUPPORT_LEVEL</param>
</service>
<service mode="buildtime" name="replace_using_package_version">
<param name="file">Dockerfile</param>
<param name="regex">%%kiwi_version%%</param>
<param name="package">python3-kiwi</param>
</service>
<service mode="buildtime" name="replace_using_package_version">
<param name="file">README</param>
<param name="regex">%%kiwi_version%%</param>
<param name="package">python3-kiwi</param>
</service>
</services>