From 1fc506c838e655b1f9de380b4dad2e2599bd5dd3 Mon Sep 17 00:00:00 2001 From: Manuel Luypaert Date: Wed, 31 Jan 2024 16:04:54 +0000 Subject: [PATCH 1/2] Prevent caching on production builds --- Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 0a7594b1..c4268f3a 100644 --- a/Makefile +++ b/Makefile @@ -105,9 +105,13 @@ build/datomic-pro-1.0.6165.zip: .PHONY: build-docker-image build-docker-image: build/ ENV.VERSION_TAG ${STORE_SECRETS_FILE} build/datomic-pro-1.0.6165.zip \ - $(call print-help,build,\ + $(call print-help,build-docker-image,\ Build the docker image from the current git revision.) - @docker build -t ${ECR_REPO_NAME}:${VERSION_TAG} \ + $(eval DOCKER_CMD := docker build -t ${ECR_REPO_NAME}:${VERSION_TAG}) +ifeq (${APP_PROFILE},prod) + $(eval DOCKER_CMD := ${DOCKER_CMD} --no-cache --pull) +endif + @${DOCKER_CMD} \ --secret id=make-secrets-file,src=${STORE_SECRETS_FILE} \ . @rm ${STORE_SECRETS_FILE} From e8b74961583089ff3c2e8374983cda3c4b012531 Mon Sep 17 00:00:00 2001 From: Manuel Luypaert Date: Wed, 31 Jan 2024 16:05:34 +0000 Subject: [PATCH 2/2] Added build-docker-image target alias for convenience --- Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Makefile b/Makefile index c4268f3a..c19f4697 100644 --- a/Makefile +++ b/Makefile @@ -116,6 +116,11 @@ endif . @rm ${STORE_SECRETS_FILE} +.PHONY: docker-build-image +docker-build-image: build-docker-image \ + $(call print-help,docker-build-image,\ + Alias for build-docker-image.) + .PHONY: build-ui build-ui: ENV.GOOGLE_OAUTH_CLIENT_ID \ $(call print-help,build-ui,\