-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathMakefile
More file actions
51 lines (38 loc) · 1.13 KB
/
Copy pathMakefile
File metadata and controls
51 lines (38 loc) · 1.13 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
.POSIX:
.PHONY: default compose infra bootstrap vendor platform secrets test fmt tidy update
env ?= $(shell ls infra | fzf --prompt "Select environment: ")
KUBECONFIG ?= $(shell terragrunt output --working-dir infra/${env}/nixos -raw kubeconfig_path 2>/dev/null)
default: infra platform
compose:
docker compose up --build --detach
infra:
cd infra/${env} && terragrunt apply --all
bootstrap: vendor platform secrets
vendor:
KUBECONFIG="${KUBECONFIG}" toolbox vendor \
--settings settings.yaml
platform:
KUBECONFIG="${KUBECONFIG}" toolbox gitops \
--path platform/${env}
secrets:
KUBECONFIG="${KUBECONFIG}" toolbox secrets \
--settings settings.yaml
test:
cd test && CLOUDLAB_ENV=${env} go test
fmt:
treefmt
yamlfmt \
--exclude infra/_modules/cluster/roles/secrets/vars/main.yml \
--exclude infra/*/secrets.yaml \
.
terragrunt hcl format
cd infra/_modules && tofu fmt -recursive
cd infra/_modules/tfstate && go fmt ./...
cd test && go fmt ./...
tidy: fmt
cd infra && terragrunt init --backend=false --lock=false --all
update:
nix flake update
clean:
docker compose down --remove-orphans --volumes
k3d cluster delete local