From 6d4326bcf340d1c3629953c011d5b0919fa90a3b Mon Sep 17 00:00:00 2001 From: Gautam Gupta Date: Tue, 4 Feb 2025 12:10:56 -0800 Subject: [PATCH] Fix vergen git build args (#34048) This should actually fix the VERGEN_GIT_SHA var? I forgot about arg scope in dockerfiles GitOrigin-RevId: 7af478db876cc344b7be0a7d3eca39aa6c7d66c1 --- self-hosted/Dockerfile.backend | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/self-hosted/Dockerfile.backend b/self-hosted/Dockerfile.backend index 6fdfe523..e1395fc5 100644 --- a/self-hosted/Dockerfile.backend +++ b/self-hosted/Dockerfile.backend @@ -2,6 +2,8 @@ # This Dockerfile builds the self-hosted version of the Convex backend # It creates a minimal runtime image that can run a local Convex instance +ARG VERGEN_GIT_SHA +ARG VERGEN_GIT_COMMIT_TIMESTAMP # cargo-chef is used to cache Rust dependencies and build artifacts # It creates a recipe of our dependencies first, then builds them in a separate stage @@ -72,11 +74,12 @@ RUN --mount=type=cache,target=/convex/target/ --mount=type=cache,target=/usr/loc COPY . . # Build the convex-local-backend binary +# Must redeclare these as environment variables so that they are available ARG VERGEN_GIT_SHA ARG VERGEN_GIT_COMMIT_TIMESTAMP +ENV VERGEN_GIT_SHA=${VERGEN_GIT_SHA} +ENV VERGEN_GIT_COMMIT_TIMESTAMP=${VERGEN_GIT_COMMIT_TIMESTAMP} RUN --mount=type=cache,target=/convex/npm-packages/common/temp/,sharing=locked --mount=type=cache,target=/convex/target/ --mount=type=cache,target=/usr/local/cargo/git/db --mount=type=cache,target=/usr/local/cargo/registry/ <