1
0
Fork 0

Makefile: allow binary override

This commit is contained in:
ryan-distrust.co 2023-05-13 01:03:35 -04:00
parent b371447ce0
commit ffef126f03
Signed by untrusted user who does not match committer: ryan
GPG Key ID: 8E401478A3FBEF72
1 changed files with 8 additions and 8 deletions

View File

@ -47,14 +47,14 @@ $(OUT_DIR)/website/index.html: \
") ")
infra/backend/.terraform: \ infra/backend/.terraform: \
$(OUT_DIR)/terraform \ $(TERRAFORM) \
$(BACKEND_TF) $(BACKEND_TF)
$(SOPS) exec-env secrets/$(ENVIRONMENT).enc.env '\ $(SOPS) exec-env secrets/$(ENVIRONMENT).enc.env '\
env -C infra/backend $(TERRAFORM) init -upgrade \ env -C infra/backend $(TERRAFORM) init -upgrade \
' '
infra/main/.terraform: | \ infra/main/.terraform: | \
$(OUT_DIR)/terraform \ $(TERRAFORM) \
config/$(ENVIRONMENT).tfbackend \ config/$(ENVIRONMENT).tfbackend \
$(MAIN_TF) $(MAIN_TF)
$(SOPS) exec-env secrets/$(ENVIRONMENT).enc.env '\ $(SOPS) exec-env secrets/$(ENVIRONMENT).enc.env '\
@ -63,8 +63,8 @@ infra/main/.terraform: | \
' '
infra/backend/$(ENVIRONMENT).tfstate: \ infra/backend/$(ENVIRONMENT).tfstate: \
$(OUT_DIR)/terraform \ $(TERRAFORM) \
$(OUT_DIR)/sops \ $(SOPS) \
infra/backend/.terraform infra/backend/.terraform
$(SOPS) exec-env secrets/$(ENVIRONMENT).enc.env '\ $(SOPS) exec-env secrets/$(ENVIRONMENT).enc.env '\
env -C infra/backend \ env -C infra/backend \
@ -76,8 +76,8 @@ infra/backend/$(ENVIRONMENT).tfstate: \
' '
config/$(ENVIRONMENT).tfbackend: | \ config/$(ENVIRONMENT).tfbackend: | \
$(OUT_DIR)/terraform $(TERRAFORM) \
$(OUT_DIR)/sops \ $(SOPS) \
# File is not committed and this has no shared state # File is not committed and this has no shared state
$(MAKE) infra/backend/$(ENVIRONMENT).tfstate $(MAKE) infra/backend/$(ENVIRONMENT).tfstate
$(SOPS) exec-env secrets/$(ENVIRONMENT).enc.env '\ $(SOPS) exec-env secrets/$(ENVIRONMENT).enc.env '\
@ -89,8 +89,8 @@ config/$(ENVIRONMENT).tfbackend: | \
.PHONY: .PHONY:
apply: \ apply: \
$(OUT_DIR)/terraform \ $(TERRAFORM) \
$(OUT_DIR)/sops \ $(SOPS) \
infra/main/.terraform infra/main/.terraform
$(call maybe_decrypt_secret,secrets/$(ENVIRONMENT).talosconfig,infra/main/talos/talosconfig) $(call maybe_decrypt_secret,secrets/$(ENVIRONMENT).talosconfig,infra/main/talos/talosconfig)
$(call maybe_decrypt_secret,secrets/$(ENVIRONMENT).kubeconfig,infra/main/talos/kubeconfig) $(call maybe_decrypt_secret,secrets/$(ENVIRONMENT).kubeconfig,infra/main/talos/kubeconfig)