diff --git a/front/Dockerfile b/front/Dockerfile index 18c60a77200f..4abe4895bc3e 100644 --- a/front/Dockerfile +++ b/front/Dockerfile @@ -2,6 +2,22 @@ FROM node:20.13.0 AS front RUN apt-get update && apt-get install -y vim redis-tools postgresql-client htop +ARG COMMIT_HASH +ARG NEXT_PUBLIC_VIZ_URL +ARG NEXT_PUBLIC_GA_TRACKING_ID +ARG NEXT_PUBLIC_DUST_CLIENT_FACING_URL + +RUN echo "Build arguments received:" && \ + echo "COMMIT_HASH=$COMMIT_HASH" && \ + echo "NEXT_PUBLIC_VIZ_URL=$NEXT_PUBLIC_VIZ_URL" && \ + echo "NEXT_PUBLIC_GA_TRACKING_ID=$NEXT_PUBLIC_GA_TRACKING_ID" && \ + echo "NEXT_PUBLIC_DUST_CLIENT_FACING_URL=$NEXT_PUBLIC_DUST_CLIENT_FACING_URL" + +ENV NEXT_PUBLIC_COMMIT_HASH=$COMMIT_HASH +ENV NEXT_PUBLIC_VIZ_URL=$NEXT_PUBLIC_VIZ_URL +ENV NEXT_PUBLIC_GA_TRACKING_ID=$NEXT_PUBLIC_GA_TRACKING_ID +ENV NEXT_PUBLIC_DUST_CLIENT_FACING_URL=$NEXT_PUBLIC_DUST_CLIENT_FACING_URL + WORKDIR /types COPY /types/package*.json ./ COPY /types/ . @@ -21,16 +37,6 @@ RUN npm ci COPY /front . -ARG COMMIT_HASH -ARG NEXT_PUBLIC_VIZ_URL -ARG NEXT_PUBLIC_GA_TRACKING_ID -ARG NEXT_PUBLIC_DUST_CLIENT_FACING_URL - -ENV NEXT_PUBLIC_COMMIT_HASH=$COMMIT_HASH -ENV NEXT_PUBLIC_VIZ_URL=$NEXT_PUBLIC_VIZ_URL -ENV NEXT_PUBLIC_GA_TRACKING_ID=$NEXT_PUBLIC_GA_TRACKING_ID -ENV NEXT_PUBLIC_DUST_CLIENT_FACING_URL=$NEXT_PUBLIC_DUST_CLIENT_FACING_URL - # fake database URIs are needed because Sequelize will throw if the `url` parameter # is undefined, and `next build` imports the `models.ts` file while "Collecting page data" RUN FRONT_DATABASE_URI="sqlite:foo.sqlite" npm run build diff --git a/k8s/cloudbuild_tmp.yaml b/k8s/cloudbuild_tmp.yaml index 637567343ca3..4eff8bf4ef7c 100644 --- a/k8s/cloudbuild_tmp.yaml +++ b/k8s/cloudbuild_tmp.yaml @@ -13,6 +13,9 @@ steps: build_args+=("--build-arg" "${key}=${value}") fi done < <(yq .env -o=props .github/configs/${_REGION}.yaml) + + echo "BUILD ARGUMENTS:" + echo ${build_args[@]} depot build \ --project 3vz0lnf16v \