forked from openshift-kni/debug-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
64 lines (48 loc) · 1007 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
RUNTIME ?= podman
REPOOWNER ?= openshift-kni
IMAGENAME ?= debug-tools
IMAGETAG ?= latest
all: dist
.PHONY: build
build: dist
# legacy CI entry point
.PHONY: ci-job
ci-job: test-e2e
# new CI entry points
.PHONY: ci-job-e2e
ci-job-e2e: test-e2e
.PHONY: ci-job-unit
ci-job-unit: test-unit
outdir:
mkdir -p _output || :
.PHONY: deps-update
deps-update:
go mod tidy && go mod vendor
.PHONY: deps-clean
deps-clean:
rm -rf vendor
.PHONY: dist
dist: binaries
.PHONY: binaries
binaries: outdir deps-update
# go flags are set in here
./hack/build-binaries.sh
.PHONY: clean
clean:
rm -rf _output
.PHONY: image
image: binaries
@echo "building image"
$(RUNTIME) build -f Dockerfile -t quay.io/$(REPOOWNER)/$(IMAGENAME):$(IMAGETAG) .
.PHONY: push
push: image
@echo "pushing image"
$(RUNTIME) push quay.io/$(REPOOWNER)/$(IMAGENAME):$(IMAGETAG)
.PHONY: test-unit
test-unit: test-unit-pkg
.PHONY: test-unit-pkg
test-unit-pkg:
go test ./pkg/...
.PHONY: test-e2e
test-e2e: binaries
ginkgo test/e2e