forked from kudobuilder/operators
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
46 lines (35 loc) · 1.32 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
KUBERNETES_VERSION=1.15.0
KUDO_VERSION=0.10.0
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
.PHONY: create-cluster
create-cluster:
echo
.PHONY: test
# Test runs the test harness using kubectl-kudo test.
test: bin/kubectl-kudo_$(KUDO_VERSION) bin/kubectl_$(KUBERNETES_VERSION)
kubectl kudo 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