chore(makefile): refactor main makefile

This commit is contained in:
Vadim Aleksandrov 2024-07-15 16:29:29 +03:00
parent 9a83963cfb
commit d768b1ec10
No known key found for this signature in database
GPG Key ID: 4D3A2E248D54FDAE

View File

@ -1,11 +1,15 @@
.PHONY: publish-app start-app deploy
HELM=$(shell which helm3 2>/dev/null || which helm)
BRANCH ?= master BRANCH ?= master
build-app: start-app:
docker build app --tag quay.csssr.cloud/csssr/test-app:$(BRANCH) $(MAKE) -C app start
docker push quay.csssr.cloud/csssr/test-app:$(BRANCH)
HELM ?= helm3 publish-app:
$(MAKE) -C app build version=$(BRANCH)
$(MAKE) -C app publish version=$(BRANCH)
deploy: deploy:
$(HELM) upgrade --install my-app-$(BRANCH) chart --set image.tag=$(BRANCH) --set ingress.host=$(BRANCH).my-app.com $(HELM) upgrade --install my-app-$(BRANCH) chart --set image.tag=$(BRANCH) --set ingress.host=$(BRANCH).csssr.cloud