forked from kubernetes-sigs/kubespray
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
56 lines (43 loc) · 1.43 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
.SILENT:
.DEFAULT_GOAL := all
export ANSIBLE_HOST_KEY_CHECKING := "False"
.PHONY: all
all: cluster
.PHONY: cluster
cluster: .venv/lock
. .venv/bin/activate && \
ansible-playbook -i inventory/cluster/hosts.yml --become --become-user=root cluster.yml
ln -sfT "$$(realpath inventory/cluster/artifacts/admin.conf)" "$(HOME)/.config/kube"
.PHONY: upgrade-cluster
upgrade-cluster: .venv/lock
. .venv/bin/activate && \
ansible-playbook -i inventory/cluster/hosts.yml --become --become-user=root upgrade-cluster.yml
ln -sfT "$$(realpath inventory/cluster/artifacts/admin.conf)" "$(HOME)/.config/kube"
.PHONY: install
install: .venv/lock .git/hooks/pre-commit
ln -sfT "$$(realpath inventory/cluster/artifacts/admin.conf)" "$(HOME)/.config/kube"
.PHONY: lint
lint: .venv/lock .git/hooks/pre-commit
. .venv/bin/activate && \
pre-commit run -a
.git/hooks/pre-commit: .pre-commit-config.yaml .venv/lock
. .venv/bin/activate && \
pre-commit install && \
touch .git/hooks/pre-commit
.venv/lock: tests/requirements.txt
python3 -m venv .venv/
. .venv/bin/activate && \
python3 -m pip install -U -r tests/requirements.txt
touch .venv/lock
.PHONY: mitogen
mitogen:
@echo Mitogen support is deprecated.
@echo Please run the following command manually:
@echo ansible-playbook -c local mitogen.yml -vv
.PHONY: clean
clean:
(. .venv/bin/activate && pre-commit uninstall) || true
rm -f "$(HOME)/.config/kube"
rm -rf .venv/
rm -rf dist/
rm -f *.retry