From fd22d1a154fd443359212fc2491e95f9186ea485 Mon Sep 17 00:00:00 2001 From: Joseph Date: Mon, 4 May 2026 12:40:47 -0400 Subject: [PATCH 1/2] Rename VERSION to OADP_VERSION in konflux.Dockerfile Konflux auto-injects VERSION as the Go toolchain version from the builder image (e.g. 1.25), which collides with our VERSION build arg used for buildinfo.Version. This causes the CLI to report the Go version instead of the OADP version. Rename to OADP_VERSION to avoid the collision. Release branches should hardcode the appropriate version (e.g. v1.6.0). Co-Authored-By: Claude Opus 4.6 (1M context) --- konflux.Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/konflux.Dockerfile b/konflux.Dockerfile index 3d6ff62d..00a3bd3c 100644 --- a/konflux.Dockerfile +++ b/konflux.Dockerfile @@ -7,8 +7,8 @@ FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_9_golang_1.25 COPY . /workspace WORKDIR /workspace -# Version information -ARG VERSION=dev +# Version information (OADP_VERSION avoids collision with Konflux-injected VERSION) +ARG OADP_VERSION=dev ARG GIT_COMMIT=unknown # Build release binaries for all platforms (CGO_ENABLED=0 for cross-platform @@ -27,7 +27,7 @@ RUN set -e && \ CGO_ENABLED=0 GOOS=$os GOARCH=$arch \ go build -trimpath -mod=mod \ -ldflags="-s -w \ - -X github.com/vmware-tanzu/velero/pkg/buildinfo.Version=${VERSION} \ + -X github.com/vmware-tanzu/velero/pkg/buildinfo.Version=${OADP_VERSION} \ -X github.com/vmware-tanzu/velero/pkg/buildinfo.GitSHA=${GIT_COMMIT} \ -X github.com/vmware-tanzu/velero/pkg/buildinfo.GitTreeState=clean" \ -o /archives/$output \ From f92b9efddb1271d288c37c7a18f3f3eef6fcb07a Mon Sep 17 00:00:00 2001 From: Joseph Date: Mon, 4 May 2026 12:46:51 -0400 Subject: [PATCH 2/2] Rename VERSION to OADP_VERSION in Containerfile.download Keep consistent with konflux.Dockerfile change. Co-Authored-By: Claude Opus 4.6 (1M context) --- Containerfile.download | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Containerfile.download b/Containerfile.download index 6a8f2d95..d504be49 100644 --- a/Containerfile.download +++ b/Containerfile.download @@ -13,8 +13,8 @@ RUN go mod download && go mod verify COPY . . -# Version information -ARG VERSION=dev +# Version information (OADP_VERSION avoids collision with Konflux-injected VERSION) +ARG OADP_VERSION=dev ARG GIT_COMMIT=unknown # Build release binaries for all platforms as direct executables @@ -33,7 +33,7 @@ RUN set -e && \ CGO_ENABLED=0 GOOS=$os GOARCH=$arch \ go build -trimpath \ -ldflags="-s -w \ - -X github.com/vmware-tanzu/velero/pkg/buildinfo.Version=${VERSION} \ + -X github.com/vmware-tanzu/velero/pkg/buildinfo.Version=${OADP_VERSION} \ -X github.com/vmware-tanzu/velero/pkg/buildinfo.GitSHA=${GIT_COMMIT} \ -X github.com/vmware-tanzu/velero/pkg/buildinfo.GitTreeState=clean" \ -o /archives/$output \