-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathMakefile
More file actions
42 lines (31 loc) · 809 Bytes
/
Makefile
File metadata and controls
42 lines (31 loc) · 809 Bytes
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
# Image URL to use all building/pushing image targets
IMG ?= dnsmadeeasy-webhook:latest
# Build manager binary
build: fmt vet
cd src; go build -o ../bin/webhook main.go
# Download dependencies
download:
cd src; go mod download
# Download dependencies
tidy: download
cd src; go mod tidy
# Run tests
test: fetch_test_binaries
echo "Testing with TEST_ZONE_NAME=${TEST_ZONE_NAME}"
cd src; go test -v .
# Fetch binaries used by test
fetch_test_binaries: _out/kubebuilder/bin/kube-apiserver
_out/kubebuilder/bin/kube-apiserver:
./scripts/fetch-test-binaries.sh
# Run go fmt against code
fmt: tidy
cd src; go fmt ./...
# Run go vet against code
vet: tidy
cd src; go vet ./...
# Build the docker image
docker-build:
docker build . -t ${IMG}
# Push the docker image
docker-push:
docker push ${IMG}