@@ -25,6 +25,7 @@ export $(shell sed 's/=.*//' ./dev/config/env.sh 2>/dev/null)
25
25
# Cortex
26
26
27
27
# build cli, start local operator, and watch for changes
28
+ .PHONY : devstart
28
29
devstart :
29
30
@$(MAKE ) operator-stop || true
30
31
@./dev/operator_local.sh || true
@@ -35,140 +36,177 @@ cli:
35
36
@go build -o ./bin/cortex ./cli
36
37
37
38
# build cli and watch for changes
39
+ .PHONY : cli-watch
38
40
cli-watch :
39
41
@rerun -watch ./pkg ./cli -run sh -c " clear && echo 'building cli...' && go build -o ./bin/cortex ./cli && clear && echo '\033[1;32mCLI built\033[0m'" || true
40
42
41
43
# start local operator and watch for changes
44
+ .PHONY : operator-local
42
45
operator-local :
43
46
@$(MAKE ) operator-stop || true
44
47
@./dev/operator_local.sh --operator-only || true
45
48
46
49
# configure kubectl to point to the cluster specified in dev/config/cluster.yaml
50
+ .PHONY : kubectl
47
51
kubectl :
48
52
@eval $$(python3 ./manager/cluster_config_env.py ./dev/config/cluster.yaml ) && eksctl utils write-kubeconfig --cluster=" $$ CORTEX_CLUSTER_NAME" --region=" $$ CORTEX_REGION" | grep -v " saved kubeconfig as" | grep -v " using region" | grep -v " eksctl version" || true
49
53
54
+ .PHONY : cluster-up
50
55
cluster-up :
51
56
@$(MAKE ) registry-all
52
57
@$(MAKE ) cli
53
58
@kill $(shell pgrep -f rerun) > /dev/null 2>&1 || true
54
59
@eval $$(python3 ./manager/cluster_config_env.py ./dev/config/cluster.yaml ) && ./bin/cortex cluster up --config=./dev/config/cluster.yaml --configure-env=" $$ CORTEX_CLUSTER_NAME" --aws-key=$$ AWS_ACCESS_KEY_ID --aws-secret=$$ AWS_SECRET_ACCESS_KEY --cluster-aws-key=$$ CLUSTER_AWS_ACCESS_KEY_ID --cluster-aws-secret=$$ CLUSTER_AWS_SECRET_ACCESS_KEY && ./bin/cortex env default " $$ CORTEX_CLUSTER_NAME"
55
60
@$(MAKE ) kubectl
56
61
62
+ .PHONY : cluster-up-y
57
63
cluster-up-y :
58
64
@$(MAKE ) registry-all
59
65
@$(MAKE ) cli
60
66
@kill $(shell pgrep -f rerun) > /dev/null 2>&1 || true
61
67
@eval $$(python3 ./manager/cluster_config_env.py ./dev/config/cluster.yaml ) && ./bin/cortex cluster up --config=./dev/config/cluster.yaml --configure-env=" $$ CORTEX_CLUSTER_NAME" --aws-key=$$ AWS_ACCESS_KEY_ID --aws-secret=$$ AWS_SECRET_ACCESS_KEY --cluster-aws-key=$$ CLUSTER_AWS_ACCESS_KEY_ID --cluster-aws-secret=$$ CLUSTER_AWS_SECRET_ACCESS_KEY --yes && ./bin/cortex env default " $$ CORTEX_CLUSTER_NAME"
62
68
@$(MAKE ) kubectl
63
69
70
+ .PHONY : cluster-down
64
71
cluster-down :
65
72
@$(MAKE ) manager-local
66
73
@$(MAKE ) cli
67
74
@kill $(shell pgrep -f rerun) > /dev/null 2>&1 || true
68
75
@./bin/cortex cluster down --config=./dev/config/cluster.yaml --aws-key=$$ AWS_ACCESS_KEY_ID --aws-secret=$$ AWS_SECRET_ACCESS_KEY
69
76
77
+ .PHONY : cluster-down-y
70
78
cluster-down-y :
71
79
@$(MAKE ) manager-local
72
80
@$(MAKE ) cli
73
81
@kill $(shell pgrep -f rerun) > /dev/null 2>&1 || true
74
82
@./bin/cortex cluster down --config=./dev/config/cluster.yaml --aws-key=$$ AWS_ACCESS_KEY_ID --aws-secret=$$ AWS_SECRET_ACCESS_KEY --yes
75
83
84
+ .PHONY : cluster-info
76
85
cluster-info :
77
86
@$(MAKE ) manager-local
78
87
@$(MAKE ) cli
79
88
@eval $$(python3 ./manager/cluster_config_env.py ./dev/config/cluster.yaml ) && ./bin/cortex cluster info --config=./dev/config/cluster.yaml --configure-env=" $$ CORTEX_CLUSTER_NAME" --aws-key=$$ AWS_ACCESS_KEY_ID --aws-secret=$$ AWS_SECRET_ACCESS_KEY && ./bin/cortex env default " $$ CORTEX_CLUSTER_NAME"
80
89
90
+ .PHONY : cluster-configure
81
91
cluster-configure :
82
92
@$(MAKE ) registry-all
83
93
@$(MAKE ) cli
84
94
@kill $(shell pgrep -f rerun) > /dev/null 2>&1 || true
85
95
@eval $$(python3 ./manager/cluster_config_env.py ./dev/config/cluster.yaml ) && ./bin/cortex cluster configure --config=./dev/config/cluster.yaml --configure-env=" $$ CORTEX_CLUSTER_NAME" --aws-key=$$ AWS_ACCESS_KEY_ID --aws-secret=$$ AWS_SECRET_ACCESS_KEY --cluster-aws-key=$$ CLUSTER_AWS_ACCESS_KEY_ID --cluster-aws-secret=$$ CLUSTER_AWS_SECRET_ACCESS_KEY && ./bin/cortex env default " $$ CORTEX_CLUSTER_NAME"
86
96
97
+ .PHONY : cluster-configure-y
87
98
cluster-configure-y :
88
99
@$(MAKE ) registry-all
89
100
@$(MAKE ) cli
90
101
@kill $(shell pgrep -f rerun) > /dev/null 2>&1 || true
91
102
@eval $$(python3 ./manager/cluster_config_env.py ./dev/config/cluster.yaml ) && ./bin/cortex cluster configure --config=./dev/config/cluster.yaml --configure-env=" $$ CORTEX_CLUSTER_NAME" --aws-key=$$ AWS_ACCESS_KEY_ID --aws-secret=$$ AWS_SECRET_ACCESS_KEY --cluster-aws-key=$$ CLUSTER_AWS_ACCESS_KEY_ID --cluster-aws-secret=$$ CLUSTER_AWS_SECRET_ACCESS_KEY --yes && ./bin/cortex env default " $$ CORTEX_CLUSTER_NAME"
92
103
93
104
# stop the in-cluster operator
105
+ .PHONY : operator-stop
94
106
operator-stop :
95
107
@$(MAKE ) kubectl
96
108
@kubectl delete --namespace=default --ignore-not-found=true deployment operator
97
109
98
110
# Docker images
99
111
112
+ .PHONY : registry-all
100
113
registry-all :
101
114
@./dev/registry.sh update all
115
+ .PHONY : registry-all-local
102
116
registry-all-local :
103
117
@./dev/registry.sh update all --skip-push
118
+ .PHONY : registry-all-slim
104
119
registry-all-slim :
105
120
@./dev/registry.sh update all --include-slim
121
+ .PHONY : registry-all-slim-local
106
122
registry-all-slim-local :
107
123
@./dev/registry.sh update all --include-slim --skip-push
124
+ .PHONY : registry-all-local-slim
108
125
registry-all-local-slim :
109
126
@./dev/registry.sh update all --include-slim --skip-push
110
127
128
+ .PHONY : registry-dev
111
129
registry-dev :
112
130
@./dev/registry.sh update dev
131
+ .PHONY : registry-dev-local
113
132
registry-dev-local :
114
133
@./dev/registry.sh update dev --skip-push
134
+ .PHONY : registry-dev-slim
115
135
registry-dev-slim :
116
136
@./dev/registry.sh update dev --include-slim
137
+ .PHONY : registry-dev-slim-local
117
138
registry-dev-slim-local :
118
139
@./dev/registry.sh update dev --include-slim --skip-push
140
+ .PHONY : registry-dev-local-slim
119
141
registry-dev-local-slim :
120
142
@./dev/registry.sh update dev --include-slim --skip-push
121
143
144
+ .PHONY : registry-api
122
145
registry-api :
123
146
@./dev/registry.sh update api
147
+ .PHONY : registry-api-local
124
148
registry-api-local :
125
149
@./dev/registry.sh update api --skip-push
150
+ .PHONY : registry-api-slim
126
151
registry-api-slim :
127
152
@./dev/registry.sh update api --include-slim
153
+ .PHONY : registry-api-slim-local
128
154
registry-api-slim-local :
129
155
@./dev/registry.sh update api --include-slim --skip-push
156
+ .PHONY : registry-api-local-slim
130
157
registry-api-local-slim :
131
158
@./dev/registry.sh update api --include-slim --skip-push
132
159
160
+ .PHONY : registry-create
133
161
registry-create :
134
162
@./dev/registry.sh create
135
163
164
+ .PHONY : registry-clean
136
165
registry-clean :
137
166
@./dev/registry.sh clean
138
167
168
+ .PHONY : manager-local
139
169
manager-local :
140
170
@./dev/registry.sh update-manager-local
141
171
142
172
# Misc
143
173
174
+ .PHONY : aws-clear-bucket
144
175
aws-clear-bucket :
145
176
@./dev/aws.sh clear-bucket
146
177
178
+ .PHONY : tools
147
179
tools :
148
180
@go get -u -v golang.org/x/lint/golint
149
181
@go get -u -v github.com/VojtechVitek/rerun/cmd/rerun
150
182
@python3 -m pip install black ' pydoc-markdown>=3.0.0,<4.0.0'
151
183
@if [[ " $$ OSTYPE" == " darwin" * ]]; then brew install parallel; elif [[ " $$ OSTYPE" == " linux" * ]]; then sudo apt-get install -y parallel; else echo " your operating system is not supported" ; fi
152
184
185
+ .PHONY : format
153
186
format :
154
187
@./dev/format.sh
155
188
156
189
# ########
157
190
# Tests #
158
191
# ########
159
192
193
+ .PHONY : test
160
194
test :
161
195
@./build/test.sh
162
196
197
+ .PHONY : test-go
163
198
test-go :
164
199
@./build/test.sh go
165
200
201
+ .PHONY : test-python
166
202
test-python :
167
203
@./build/test.sh python
168
204
205
+ .PHONY : lint
169
206
lint :
170
207
@./build/lint.sh
171
208
209
+ .PHONY : test-examples
172
210
test-examples :
173
211
@$(MAKE ) registry-all
174
212
@./build/test-examples.sh
@@ -177,14 +215,18 @@ test-examples:
177
215
# CI Commands #
178
216
# ##############
179
217
218
+ .PHONY : ci-build-images
180
219
ci-build-images :
181
220
@./build/build-images.sh
182
221
222
+ .PHONY : ci-push-images
183
223
ci-push-images :
184
224
@./build/push-images.sh
185
225
226
+ .PHONY : ci-build-cli
186
227
ci-build-cli :
187
228
@./build/cli.sh
188
229
230
+ .PHONY : ci-build-and-upload-cli
189
231
ci-build-and-upload-cli :
190
232
@./build/cli.sh upload
0 commit comments