-
Notifications
You must be signed in to change notification settings - Fork 27
/
Makefile
50 lines (36 loc) · 1021 Bytes
/
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
.PHONY: deps-update \
build-bin \
unittests \
verify
export DOCKERFILE?=Dockerfile
export IMAGE_BASE?=quay.io/fpaoline/network-metrics-daemon
export TAG?=latest
export NAMESPACE?=openshift-network-metrics
export MONITORING_NAMESPACE?=openshift-monitoring
export KUBE_EXEC?=oc
export KUBE_RBAC_PROXY?=quay.io/openshift/origin-kube-rbac-proxy:latest
export IMAGE_TAG:=$(IMAGE_BASE):$(TAG)
deps-update:
go mod tidy && \
go mod vendor
build-bin:
go build --mod=vendor -ldflags "-X main.build=$$(git rev-parse HEAD)" -o bin/network-metrics-daemon
chmod +x bin/network-metrics-daemon
unittests: verify
go test ./pkg/...
image: ; $(info Building image...)
docker build -f $(DOCKERFILE) -t $(IMAGE_TAG) .
image_push: ; $(info Building image...)
docker image push $(IMAGE_TAG)
deploy:
hack/deploy.sh
deploy-k8s:
DEPLOYMENT_FLAVOUR="-k8s" hack/deploy.sh
get-tools:
hack/get_tools.sh
verify: get-tools
./hack/check_gofmt.sh
./hack/check_golint.sh
./hack/check_changes.sh
run-test:
hack/run-test.sh