forked from ca-gip/kubi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
37 lines (25 loc) · 1.04 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
.PHONY: clean
REPO= github.com/ca-gip/kubi
IMAGE= kubi
DOCKER_REPO= cagip
clean:
rm -rf vendor build/*
dependency:
go mod vendor
codegen: dependency
bash hack/update-codegen.sh
test: codegen
GOARCH=amd64 go test ./internal/services ./pkg/types ./internal/utils
test-only:
@echo "-> Test only kubi operator binary"
GOARCH=amd64 go test ./internal/services ./pkg/types ./internal/utils
build-operator: test
@echo "-> Building kubi operator"
CGO_ENABLED=0 GOARCH=amd64 go build -a -ldflags '-extldflags "-static"' -v -o ./build/kubi-operator -i $(GOPATH)/src/$(REPO)/cmd/operator/main.go
build-api: test
@echo "-> Building kubi api"
CGO_ENABLED=0 GOARCH=amd64 go build -a -ldflags '-extldflags "-static"' -v -o ./build/kubi-api -i $(GOPATH)/src/$(REPO)/cmd/api/main.go
build-webhook: test
@echo "-> Building kubi authorization webhook"
CGO_ENABLED=0 GOARCH=amd64 go build -a -ldflags '-extldflags "-static"' -v -o ./build/kubi-webhook -i $(GOPATH)/src/$(REPO)/cmd/authorization-webhook/main.go
build: build-webhook build-operator build-api