This repository has been archived by the owner on Oct 22, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 35
/
Makefile
100 lines (67 loc) · 2.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
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
#!/usr/bin/env make
MAKEFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
MAKEFILE_DIR := $(patsubst %/,%,$(dir $(MAKEFILE_PATH)))
export PROJECT ?= quarks-operator
export QUARKS_UTILS ?= tools/quarks-utils
export GROUP_VERSIONS ?= boshdeployment:v1alpha1
all: tools build test
setup:
# installs ginkgo, counterfeiter, linters, ...
# includes bin/tools
bin/dev-tools
.PHONY: tools
tools:
bin/tools
up:
bin/up
############ LINTER TARGETS ############
lint: tools
$(QUARKS_UTILS)/bin/lint
check-scripts:
bin/check-scripts
staticcheck:
staticcheck ./...
vet:
go list ./... | xargs go vet
############ BUILD TARGETS ############
.PHONY: build
build:
bin/build
build-image: tools
bin/build-image
build-helm:
bin/build-helm
############ TEST TARGETS ############
test: lint test-unit test-integration test-integration-storage test-helm-e2e test-helm-e2e-storage test-cli-e2e test-integration-subcmds
test-unit: tools
$(QUARKS_UTILS)/bin/test-unit
test-integration: tools
$(QUARKS_UTILS)/bin/test-integration
test-cli-e2e: tools
$(QUARKS_UTILS)/bin/test-cli-e2e
test-helm-e2e: tools build-helm
$(QUARKS_UTILS)/bin/test-helm-e2e
test-helm-e2e-storage: tools build-helm
bin/test-helm-e2e-storage
test-helm-e2e-upgrade: tools build-helm
bin/test-helm-e2e-upgrade
test-integration-storage: tools
INTEGRATION_SUITE=storage $(QUARKS_UTILS)/bin/test-integration
test-integration-subcmds: tools
INTEGRATION_SUITE=util $(QUARKS_UTILS)/bin/test-integration
############ GENERATE TARGETS ############
generate: gen-kube gen-fakes
gen-kube: tools
$(QUARKS_UTILS)/bin/gen-kube
gen-fakes: setup
bin/gen-fakes
gen-command-docs:
go run cmd/gen-command-docs.go docs/commands/
gen-crd-docs:
kubectl get crd boshdeployments.quarks.cloudfoundry.org -o yaml > docs/crds/quarks_v1alpha1_boshdeployment_crd.yaml
kubectl get crd quarksstatefulsets.quarks.cloudfoundry.org -o yaml > docs/crds/quarks_v1alpha1_quarksstatefulset_crd.yaml
verify-gen-kube:
bin/verify-gen-kube
############ COVERAGE TARGETS ############
coverage: tools
$(QUARKS_UTILS)/bin/coverage