forked from kubevirt/hyperconverged-cluster-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
73 lines (56 loc) · 1.57 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
QUAY_USERNAME ?=
QUAY_PASSWORD ?=
SOURCE_DIRS = cmd pkg
SOURCES := $(shell find . -name '*.go' -not -path "*/vendor/*")
IMAGE_REGISTRY ?= docker.io
IMAGE_TAG ?= latest
OPERATOR_IMAGE ?= rthallisey/hyperconverged-cluster-operator
build: $(SOURCES) ## Build binary from source
go build -i -ldflags="-s -w" -o _out/hyperconverged-cluster-operator ./cmd/manager > /dev/null
clean: ## Clean up the working environment
@rm -rf _out/
start:
./hack/deploy.sh
hack-clean: ## Run ./hack/clean.sh
./hack/clean.sh
docker-build: docker-build-operator
docker-build-operator:
docker build -f build/Dockerfile -t $(IMAGE_REGISTRY)/$(OPERATOR_IMAGE):$(IMAGE_TAG) .
docker-push: docker-push-operator
docker-push-operator:
docker push $(IMAGE_REGISTRY)/$(OPERATOR_IMAGE):$(IMAGE_TAG)
cluster-up:
./cluster/up.sh
cluster-down:
./cluster/down.sh
cluster-sync:
./cluster/sync.sh
cluster-clean:
CMD="./cluster/kubectl.sh" ./hack/clean.sh
stageRegistry:
@REGISTRY_NAMESPACE=redhat-operators-stage ./hack/quay-registry.sh $(QUAY_USERNAME) $(QUAY_PASSWORD)
help: ## Show this help screen
@echo 'Usage: make <OPTIONS> ... <TARGETS>'
@echo ''
@echo 'Available targets are:'
@echo ''
@grep -E '^[ a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | \
awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
@echo ''
test-unit:
ginkgo -r
test: test-unit
.PHONY: start \
clean \
build \
help \
hack-clean \
docker-build \
docker-build-operator \
docker-push \
docker-push-operator \
cluster-up \
cluster-down \
cluster-sync \
cluster-clean \
stageRegistry