forked from kubevirt/cloud-provider-kubevirt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
85 lines (65 loc) · 1.59 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
VERSION ?= main
REGISTRY ?= kubevirt
CLUSTER_NAME ?= kubevirt
KUBECONFIG := dev/kubeconfig
CLOUD_CONFIG := dev/cloud-config
CERT_DIR := dev/
export BIN_DIR := bin
GOLANGCI_LINT_VERSION ?= v1.52.2
.PHONY: all
all: clean test build
.PHONY: start
start:
go run ./cmd/kubevirt-cloud-controller-manager \
--kubeconfig=$(KUBECONFIG) \
--cloud-provider=kubevirt \
--use-service-account-credentials \
--cloud-config=$(CLOUD_CONFIG) \
--cluster-name=$(CLUSTER_NAME) \
--cert-dir=$(CERT_DIR) \
--v=2
.PHONY: clean
clean:
if [ -d bin ]; then rm -r bin; fi
go clean -modcache -i -x ./...
.PHONY:deps-update
deps-update:
go mod tidy
bin:
mkdir bin
.PHONY: test
test:
go test ./pkg/...
.PHONY: build
build: bin
CGO_ENABLED=0 GOOS=linux go build -mod vendor -ldflags="-s -w" -o bin/kubevirt-cloud-controller-manager ./cmd/kubevirt-cloud-controller-manager
.PHONY:image
image:
docker build -t $(REGISTRY)/kubevirt-cloud-controller-manager:$(VERSION) -f build/images/kubevirt-cloud-controller-manager/Dockerfile .
.PHONY: push
push:
docker push $(REGISTRY)/kubevirt-cloud-controller-manager:$(VERSION)
.PHONY: generate
generate:
go generate ./pkg/...
.PHONY: cluster-up
cluster-up:
./kubevirtci up
.PHONY: cluster-sync
cluster-sync:
./kubevirtci sync
.PHONY: cluster-down
cluster-down:
./kubevirtci down
.PHONY: lint
lint:
go run github.com/golangci/golangci-lint/cmd/golangci-lint@$(GOLANGCI_LINT_VERSION) run --timeout=10m
.PHONY: functest
functest:
./hack/functest.sh
.PHONY: build-e2e-test
build-e2e-test:
./hack/build-e2e.sh
.PHONY: e2e-test
e2e-test: build-e2e-test
./hack/run-e2e.sh