From 554afb23db5515a27251c0be829e23a515e8f28d Mon Sep 17 00:00:00 2001 From: Bar Shem-Tov Date: Tue, 23 Jun 2026 09:31:56 +0300 Subject: [PATCH] feat: stamp org.opencontainers.image.revision label on UI image Add a GIT_COMMIT_SHA build-arg (full git sha) and set it as the org.opencontainers.image.revision OCI label on the production image so the release promotion workflow can recover the UI commit via skopeo inspect. The existing short-hash COMMIT_HASH file is left unchanged. --- Dockerfile | 3 +++ package.json | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 8822f3795..5d3cee3d8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -37,6 +37,9 @@ RUN echo ${COMMIT_HASH} > ./build/COMMIT_HASH && \ FROM gcr.io/iguazio/nginx-unprivileged:1.31.1-alpine AS production-stage +ARG GIT_COMMIT_SHA +LABEL org.opencontainers.image.revision=$GIT_COMMIT_SHA + # align UID & GID with nginx-unprivileged image UID & GID ARG UID=101 ARG GID=101 diff --git a/package.json b/package.json index 17236fe4f..ba8ecafdd 100644 --- a/package.json +++ b/package.json @@ -88,7 +88,7 @@ "preview": "vite preview", "preinstall": "npx force-resolutions", "test:coverage": "npm run test -- --coverage --watchAll=false", - "docker": "docker build -t ${MLRUN_DOCKER_REGISTRY}${MLRUN_DOCKER_REPO:-mlrun}/mlrun-ui:${MLRUN_DOCKER_TAG:-latest} --build-arg COMMIT_HASH=\"`git rev-parse --short HEAD`\" --build-arg DATE=\"`date -u`\" -f Dockerfile .", + "docker": "docker build -t ${MLRUN_DOCKER_REGISTRY}${MLRUN_DOCKER_REPO:-mlrun}/mlrun-ui:${MLRUN_DOCKER_TAG:-latest} --build-arg COMMIT_HASH=\"`git rev-parse --short HEAD`\" --build-arg GIT_COMMIT_SHA=\"`git rev-parse HEAD`\" --build-arg DATE=\"`date -u`\" -f Dockerfile .", "generate-rn": "./generate-release-notes.js ${MLRUN_OLD_VERSION} ${MLRUN_VERSION} ${MLRUN_RELEASE_BRANCH} ${MLRUN_RELEASE_TYPE}", "storybook": "start-storybook -p 6006", "build-storybook": "build-storybook",