File tree 3 files changed +6
-0
lines changed
3 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ CONTAINER_TOOL_EXTRA_ARGS ?=
16
16
EXTRA_RPM_PACKAGES ?=
17
17
GRAPH_ROOT=$(shell podman info --format '{{ .Store.GraphRoot }}')
18
18
UMASK=$(shell umask)
19
+ IMAGE_VERSION := $(or ${IMAGE_VERSION},$(shell git rev-parse --short HEAD))
19
20
20
21
AUTH_JSON ?=
21
22
Original file line number Diff line number Diff line change @@ -99,6 +99,8 @@ COPY --from=builder --chmod=444 /home/builder/yum-packaging-precompiled-kmod/tmp
99
99
# Temporary workaround until the permanent fix for libdnf is merged
100
100
COPY nvidia-toolkit-firstboot.service /usr/lib/systemd/system/nvidia-toolkit-firstboot.service
101
101
102
+ ARG IMAGE_VERSION
103
+
102
104
# TODO: rework this monstrosity into a build.sh (or even not shell script)
103
105
# The need for the `cp /etc/dnf/dnf.conf` is a workaround for https://github.com/containers/bootc/issues/637
104
106
RUN mv /etc/selinux /etc/selinux.tmp \
@@ -141,6 +143,7 @@ RUN mv /etc/selinux /etc/selinux.tmp \
141
143
# Install rhc connect for insights telemetry gathering
142
144
&& . /etc/os-release && if [ "${ID}" == "rhel" ]; then \
143
145
dnf install -y rhc rhc-worker-playbook; \
146
+ echo "RHEL_AI_VERSION='${IMAGE_VERSION}'" >> /etc/os-release;\
144
147
fi \
145
148
&& dnf clean all \
146
149
&& ln -s ../cloud-init.target /usr/lib/systemd/system/default.target.wants \
Original file line number Diff line number Diff line change @@ -16,6 +16,8 @@ bootc: driver-toolkit check-sshkey prepare-files
16
16
$(DRIVER_TOOLKIT_IMAGE:%=--build-arg DRIVER_TOOLKIT_IMAGE=% ) \
17
17
$(DRIVER_VERSION:%=--build-arg DRIVER_VERSION=% ) \
18
18
$(DRIVER_VERSION:%=--label driver-version=% ) \
19
+ $(IMAGE_VERSION:%=--label image_version=% ) \
20
+ $(IMAGE_VERSION:%=--build-arg IMAGE_VERSION=% ) \
19
21
$(EXTRA_RPM_PACKAGES:%=--build-arg EXTRA_RPM_PACKAGES=% ) \
20
22
$(FROM:%=--build-arg BASEIMAGE=% ) \
21
23
$(INSTRUCTLAB_IMAGE:%=--build-arg INSTRUCTLAB_IMAGE=% ) \
You can’t perform that action at this time.
0 commit comments