From 94f57449843941a6245efc6f8903a4745723d416 Mon Sep 17 00:00:00 2001 From: Rauno Viskus Date: Mon, 17 Jun 2024 18:01:58 +0300 Subject: [PATCH] fix: remove reliance on generate-webapp step --- Makefile | 17 +++++++++-------- coupon/deployment/service.yaml | 2 +- inventory/deployment/deployment.yaml | 1 - 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 3ed8ee8..8fa9399 100644 --- a/Makefile +++ b/Makefile @@ -1,14 +1,15 @@ PROJECT_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST)))) +VERSION := v0.1 .PHONY: generate-webapp generate-webapp: @echo "Generating webapp..." - @cd $(PROJECT_DIR)frontend/webapp && yarn build + @cd $(PROJECT_DIR)frontend/webapp && yarn && yarn build rm -rf $(PROJECT_DIR)/frontend/src/main/resources/static/* cp -r $(PROJECT_DIR)frontend/webapp/out/* $(PROJECT_DIR)/frontend/src/main/resources/static/ .PHONY: build-images -build-images: generate-webapp +build-images: @echo "Building images..." docker build -t dev/odigos-demo-frontend:dev $(PROJECT_DIR)frontend -f $(PROJECT_DIR)frontend/Dockerfile docker build -t dev/inventory:dev $(PROJECT_DIR)inventory -f $(PROJECT_DIR)inventory/Dockerfile @@ -35,10 +36,10 @@ deploy: kubectl apply -f $(PROJECT_DIR)membership/deployment/ .PHONY: build-push-images-prod -build-push-images-prod: generate-webapp +build-push-images-prod: @echo "Building images..." - docker buildx build -t keyval/odigos-demo-frontend:v0.1 $(PROJECT_DIR)frontend -f $(PROJECT_DIR)frontend/Dockerfile --platform linux/amd64,linux/arm64 --push - docker buildx build -t keyval/odigos-demo-inventory:v0.1 $(PROJECT_DIR)inventory -f $(PROJECT_DIR)inventory/Dockerfile --platform linux/amd64,linux/arm64 --push - docker buildx build -t keyval/odigos-demo-pricing:v0.1 $(PROJECT_DIR)pricing -f $(PROJECT_DIR)pricing/Dockerfile --platform linux/amd64,linux/arm64 --push - docker buildx build -t keyval/odigos-demo-coupon:v0.1 $(PROJECT_DIR)coupon -f $(PROJECT_DIR)coupon/Dockerfile --platform linux/amd64,linux/arm64 --push - docker buildx build -t keyval/odigos-demo-membership:v0.1 $(PROJECT_DIR)membership -f $(PROJECT_DIR)membership/Dockerfile --platform linux/amd64,linux/arm64 --push + docker buildx build -t keyval/odigos-demo-frontend:${VERSION} $(PROJECT_DIR)frontend -f $(PROJECT_DIR)frontend/Dockerfile --platform linux/amd64,linux/arm64 --push + docker buildx build -t keyval/odigos-demo-inventory:${VERSION} $(PROJECT_DIR)inventory -f $(PROJECT_DIR)inventory/Dockerfile --platform linux/amd64,linux/arm64 --push + docker buildx build -t keyval/odigos-demo-pricing:${VERSION} $(PROJECT_DIR)pricing -f $(PROJECT_DIR)pricing/Dockerfile --platform linux/amd64,linux/arm64 --push + docker buildx build -t keyval/odigos-demo-coupon:${VERSION} $(PROJECT_DIR)coupon -f $(PROJECT_DIR)coupon/Dockerfile --platform linux/amd64,linux/arm64 --push + docker buildx build -t keyval/odigos-demo-membership:${VERSION} $(PROJECT_DIR)membership -f $(PROJECT_DIR)membership/Dockerfile --platform linux/amd64,linux/arm64 --push diff --git a/coupon/deployment/service.yaml b/coupon/deployment/service.yaml index 4e24fe7..8b27f9e 100644 --- a/coupon/deployment/service.yaml +++ b/coupon/deployment/service.yaml @@ -8,4 +8,4 @@ spec: ports: - protocol: TCP port: 8080 - targetPort: 8080 \ No newline at end of file + targetPort: 8080 diff --git a/inventory/deployment/deployment.yaml b/inventory/deployment/deployment.yaml index 1949e8c..31db2ec 100644 --- a/inventory/deployment/deployment.yaml +++ b/inventory/deployment/deployment.yaml @@ -20,4 +20,3 @@ spec: - containerPort: 8080 securityContext: runAsUser: 1000 - \ No newline at end of file