-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
37 lines (27 loc) · 1.06 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Makefile
BASEDIR = $(shell pwd)
# VARIANTS := embassy denbi minikube
VARIANTS := embassy minikube
ENVIRONMENTS := prod dev local
.PHONY: all $(VARIANTS) $(ENVIRONMENTS) $(VARIANTS:%=%.prod) $(VARIANTS:%=%.dev) htpassword
all: $(VARIANTS)
$(VARIANTS): %:
@echo "Deploying $@..."
$(MAKE) [email protected]
$(MAKE) [email protected]
$(ENVIRONMENTS): %:
@echo "Deploying to $@..."
ENV_FILE="$*[email protected]"
$(MAKE) $(VARIANTS:%=%.$@)
$(VARIANTS:%=%.prod): %.prod:
@echo "Deploying $* to prod..."
helmsman --apply --debug --group "prod" -f helmsman.yaml -f helmsman/prod.yaml -e $*.prod.env --subst-env-values
$(VARIANTS:%=%.dev): %.dev:
@echo "Deploying $* to dev..."
helmsman --apply --debug --group "dev" -f helmsman.yaml -f helmsman/dev.yaml -e $*.dev.env --subst-env-values
$(VARIANTS:%=%.local): %.local:
@echo "Deploying $* to local..."
helmsman --apply --debug --group "prod" -f helmsman.yaml -f helmsman/local.yaml -e $*.local.env --subst-env-values
htpassword:
docker run --rm -ti xmartlabs/htpasswd ${CI_REGISTRY_USER} ${CI_REGISTRY_PASSWORD} > htpasswd_file
cat htpasswd_file