forked from filipeforattini/ff-iac-github-actions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
140 lines (117 loc) · 3.21 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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
.PHONY: all test clean
all: render
render:
ytt \
-f ./workflows
help:
ytt website
REPOSITORY ?= ff-svc-moleculer
test:
export REPOSITORY=${REPOSITORY} \
&& cd ./test; sh ./tests.sh;
K8S_NAMESPACE ?= ff-svc-moleculer-dev
K8S_LABELS ?= ""
DEPENDENCY_FILE ?= "$(PWD)/test/tmp/k8s-dependencies-full.yml"
DEPENDENCY_FILE_EMPTY ?= "$(PWD)/test/tmp/k8s-dependencies-empty.yml"
deps-add:
true \
&& make dep-mysql-add \
&& make dep-postgres-add \
&& make dep-rabbitmq-add \
&& make dep-elasticsearch-add \
&& make dep-redis-add \
&& make dep-nats-add \
&& make dep-etcd-add
deps-del:
true \
&& make dep-mysql-del \
&& make dep-postgres-del \
&& make dep-rabbitmq-del \
&& make dep-elasticsearch-del \
&& make dep-redis-del \
&& make dep-nats-del \
&& make dep-etcd-del
dep-mysql-add:
K8S_NAMESPACE=$(K8S_NAMESPACE) \
K8S_LABELS=$(K8S_LABELS) \
DEPENDENCY_NAME=mysql \
DEPENDENCY_FILE=$(DEPENDENCY_FILE) \
./src/dependency-install.sh
dep-mysql-del:
K8S_NAMESPACE=$(K8S_NAMESPACE) \
K8S_LABELS=$(K8S_LABELS) \
DEPENDENCY_NAME=mysql \
DEPENDENCY_FILE=$(DEPENDENCY_FILE_EMPTY) \
./src/dependency-install.sh
dep-postgres-add:
K8S_NAMESPACE=$(K8S_NAMESPACE) \
K8S_LABELS=$(K8S_LABELS) \
DEPENDENCY_NAME=postgres \
DEPENDENCY_FILE=$(DEPENDENCY_FILE) \
./src/dependency-install.sh
dep-postgres-del:
K8S_NAMESPACE=$(K8S_NAMESPACE) \
K8S_LABELS=$(K8S_LABELS) \
DEPENDENCY_NAME=postgres \
DEPENDENCY_FILE=$(DEPENDENCY_FILE_EMPTY) \
./src/dependency-install.sh
dep-rabbitmq-add:
K8S_NAMESPACE=$(K8S_NAMESPACE) \
K8S_LABELS=$(K8S_LABELS) \
DEPENDENCY_NAME=rabbitmq \
DEPENDENCY_FILE=$(DEPENDENCY_FILE) \
./src/dependency-install.sh
dep-rabbitmq-del:
K8S_NAMESPACE=$(K8S_NAMESPACE) \
K8S_LABELS=$(K8S_LABELS) \
DEPENDENCY_NAME=rabbitmq \
DEPENDENCY_FILE=$(DEPENDENCY_FILE_EMPTY) \
./src/dependency-install.sh
dep-elasticsearch-add:
K8S_NAMESPACE=$(K8S_NAMESPACE) \
K8S_LABELS=$(K8S_LABELS) \
DEPENDENCY_NAME=elasticsearch \
DEPENDENCY_FILE=$(DEPENDENCY_FILE) \
./src/dependency-install.sh
dep-elasticsearch-del:
K8S_NAMESPACE=$(K8S_NAMESPACE) \
K8S_LABELS=$(K8S_LABELS) \
DEPENDENCY_NAME=elasticsearch \
DEPENDENCY_FILE=$(DEPENDENCY_FILE_EMPTY) \
./src/dependency-install.sh
dep-redis-add:
K8S_NAMESPACE=$(K8S_NAMESPACE) \
K8S_LABELS=$(K8S_LABELS) \
DEPENDENCY_NAME=redis \
DEPENDENCY_FILE=$(DEPENDENCY_FILE) \
./src/dependency-install.sh
dep-redis-del:
K8S_NAMESPACE=$(K8S_NAMESPACE) \
K8S_LABELS=$(K8S_LABELS) \
DEPENDENCY_NAME=redis \
DEPENDENCY_FILE=$(DEPENDENCY_FILE_EMPTY) \
./src/dependency-install.sh
dep-nats-add:
K8S_NAMESPACE=$(K8S_NAMESPACE) \
K8S_LABELS=$(K8S_LABELS) \
DEPENDENCY_NAME=nats \
DEPENDENCY_FILE=$(DEPENDENCY_FILE) \
./src/dependency-install.sh
dep-nats-del:
K8S_NAMESPACE=$(K8S_NAMESPACE) \
K8S_LABELS=$(K8S_LABELS) \
DEPENDENCY_NAME=nats \
DEPENDENCY_FILE=$(DEPENDENCY_FILE_EMPTY) \
./src/dependency-install.sh
dep-etcd-add:
K8S_NAMESPACE=$(K8S_NAMESPACE) \
K8S_LABELS=$(K8S_LABELS) \
DEPENDENCY_NAME=etcd \
DEPENDENCY_FILE=$(DEPENDENCY_FILE) \
./src/dependency-install.sh
dep-etcd-del:
K8S_NAMESPACE=$(K8S_NAMESPACE) \
K8S_LABELS=$(K8S_LABELS) \
DEPENDENCY_NAME=etcd \
DEPENDENCY_FILE=$(DEPENDENCY_FILE_EMPTY) \
./src/dependency-install.sh