-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
58 lines (42 loc) · 1.14 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.PHONY: all dep build test lint fix
all: fix lint test dep build
dep:
@echo " > Making sure go.mod matches the source code"
go mod tidy -v
go install github.com/swaggo/swag/cmd/swag@latest
build: dep build-docs
@echo " > build"
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -v -o build/manager
build-docs:
@echo " > Running swaggo"
swag init -g internal/server/server.go
test:
@echo "> Running tests"
go test ./...
lint:
@echo " > Running golangci-lint"
golangci-lint run
fix:
@echo " > Running go fmt"
go fmt ./...
# Development environment targets
setup-dev-env: create-kind init-tilt
create-kind:
bash ./scripts/kind.sh kaas-cluster
init-tilt:
kind export kubeconfig --name kaas-cluster
tilt up
tilt-ci:
kind export kubeconfig --name kaas-cluster
tilt ci
# Tilt targets
apply-capi-dependencies:
kubectl apply -f ./scripts/assets/crds/dependencies
wait-capi-dependencies-resources:
bash ./scripts/wait-controllers.sh dependencies
apply-capi:
kubectl apply -f ./scripts/assets/crds/cluster-api
wait-capi-resources:
bash ./scripts/wait-controllers.sh cluster-api
apply-test-clusters:
kubectl apply -f ./scripts/assets/crs