From 32ccbd27a7a7ab5d97c268a02df955fcfd923e22 Mon Sep 17 00:00:00 2001 From: lucferbux Date: Tue, 21 Jan 2025 16:22:54 +0100 Subject: [PATCH] Fix issue with make command Signed-off-by: lucferbux --- clients/ui/Dockerfile | 2 ++ clients/ui/Makefile | 6 +++--- clients/ui/scripts/deploy_kind_cluster.sh | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/clients/ui/Dockerfile b/clients/ui/Dockerfile index 21a9af3b3..930814962 100644 --- a/clients/ui/Dockerfile +++ b/clients/ui/Dockerfile @@ -11,6 +11,8 @@ ARG DISTROLESS_BASE_IMAGE=gcr.io/distroless/static:nonroot FROM ${NODE_BASE_IMAGE} AS ui-builder ARG UI_SOURCE_CODE +ARG DEPLOYMENT_MODE +ARG MOCK_AUTH WORKDIR /usr/src/app diff --git a/clients/ui/Makefile b/clients/ui/Makefile index 06498fb53..de125cc7d 100644 --- a/clients/ui/Makefile +++ b/clients/ui/Makefile @@ -50,7 +50,7 @@ docker-build: .PHONY: docker-build-standalone docker-build-standalone: - MOCK_AUTH=true DEPLOYMENT_MODE=standalone $(CONTAINER_TOOL) build -t ${IMG_UI_STANDALONE} . + $(CONTAINER_TOOL) build --build-arg MOCK_AUTH=true --build-arg DEPLOYMENT_MODE=standalone -t ${IMG_UI_STANDALONE} . .PHONY: docker-buildx docker-buildx: @@ -58,7 +58,7 @@ docker-buildx: .PHONY: docker-buildx-standalone docker-buildx-standalone: - MOCK_AUTH=true DEPLOYMENT_MODE=standalone docker buildx build --platform ${PLATFORM} -t ${IMG_UI_STANDALONE} --push . + docker buildx build --build-arg MOCK_AUTH=true --build-arg DEPLOYMENT_MODE=standalone --platform ${PLATFORM} -t ${IMG_UI_STANDALONE} --push . ############ Push ############ @@ -83,7 +83,7 @@ frontend-build: .PHONY: frontend-build-standalone frontend-build-standalone: - MOCK_AUTH=true DEPLOYMENT_MODE=standalone cd frontend && npm run build:prod + cd frontend && MOCK_AUTH=true DEPLOYMENT_MODE=standalone npm run build:prod .PHONY: bff-build bff-build: diff --git a/clients/ui/scripts/deploy_kind_cluster.sh b/clients/ui/scripts/deploy_kind_cluster.sh index 66d547e51..a44fb51f1 100755 --- a/clients/ui/scripts/deploy_kind_cluster.sh +++ b/clients/ui/scripts/deploy_kind_cluster.sh @@ -6,7 +6,7 @@ command -v kubectl >/dev/null 2>&1 || { echo >&2 "kubectl is required but it's n command -v kind >/dev/null 2>&1 || { echo >&2 "kind is required but it's not installed. Aborting."; exit 1; } # Check if the script has rights to push an image into the registry -if ! docker push "${IMG_UI_STANDALONE}" --dry-run >/dev/null 2>&1; then +if ! docker push "${IMG_UI_STANDALONE}" >/dev/null 2>&1; then echo -e "\033[31mError: No rights to push the image to the registry ${IMG_UI_STANDALONE}, you can change the image in the env variable IMG_UI_STANDALONE\033[0m" exit 1 fi