-
Notifications
You must be signed in to change notification settings - Fork 78
/
Makefile
58 lines (44 loc) · 1.78 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
KUBERNETES_VERSION=1.16.9
KUDO_VERSION=0.17.0
KUTTL_VERSION=0.6.1
ARTIFACTS ?= artifacts/
OS=$(shell uname -s | tr '[:upper:]' '[:lower:]')
KUDO_MACHINE=$(shell uname -m)
MACHINE=$(shell uname -m)
ifeq "$(MACHINE)" "x86_64"
MACHINE=amd64
endif
export PATH := $(shell pwd)/bin/:$(PATH)
bin/:
mkdir -p bin/
bin/kubectl_$(KUBERNETES_VERSION): bin/
curl -Lo bin/kubectl_$(KUBERNETES_VERSION) https://storage.googleapis.com/kubernetes-release/release/v$(KUBERNETES_VERSION)/bin/$(OS)/$(MACHINE)/kubectl
chmod +x bin/kubectl_$(KUBERNETES_VERSION)
ln -sf ./kubectl_$(KUBERNETES_VERSION) ./bin/kubectl
bin/kubectl-kudo_$(KUDO_VERSION): bin/
curl -Lo bin/kubectl-kudo_$(KUDO_VERSION) https://github.com/kudobuilder/kudo/releases/download/v$(KUDO_VERSION)/kubectl-kudo_$(KUDO_VERSION)_$(OS)_$(KUDO_MACHINE)
chmod +x bin/kubectl-kudo_$(KUDO_VERSION)
ln -sf ./kubectl-kudo_$(KUDO_VERSION) ./bin/kubectl-kudo
bin/kubectl-kuttl_$(KUTTL_VERSION): bin/
curl -Lo bin/kubectl-kuttl_$(KUTTL_VERSION) https://github.com/kudobuilder/kuttl/releases/download/v$(KUTTL_VERSION)/kubectl-kuttl_$(KUTTL_VERSION)_$(OS)_$(KUDO_MACHINE)
chmod +x bin/kubectl-kuttl_$(KUTTL_VERSION)
ln -sf ./kubectl-kuttl_$(KUTTL_VERSION) ./bin/kubectl-kuttl
.PHONY: install-kudo
install-kudo: bin/kubectl-kudo_$(KUDO_VERSION)
.PHONY: install-kuttl
install-kuttl: bin/kubectl-kuttl_$(KUTTL_VERSION)
.PHONY: create-cluster
create-cluster:
echo
.PHONY: test
# Test runs the test harness using kubectl-kudo test.
test: install-kudo bin/kubectl_$(KUBERNETES_VERSION) install-kuttl
kubectl kuttl test --kind-config=test/kind/kubernetes-$(KUBERNETES_VERSION).yaml --artifacts-dir=$(ARTIFACTS)
.PHONY: clean
# cleans project
clean:
./clean-build.sh
.PHONY: index
# builds repo index
index: bin/kubectl-kudo_$(KUDO_VERSION)
./build-community-repo.sh