Skip to content

Commit c8ef4c6

Browse files
committed
Declare all make commands as .PHONY
1 parent 7de22a8 commit c8ef4c6

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

Makefile

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ export $(shell sed 's/=.*//' ./dev/config/env.sh 2>/dev/null)
2525
# Cortex
2626

2727
# build cli, start local operator, and watch for changes
28+
.PHONY: devstart
2829
devstart:
2930
@$(MAKE) operator-stop || true
3031
@./dev/operator_local.sh || true
@@ -35,140 +36,177 @@ cli:
3536
@go build -o ./bin/cortex ./cli
3637

3738
# build cli and watch for changes
39+
.PHONY: cli-watch
3840
cli-watch:
3941
@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
4042

4143
# start local operator and watch for changes
44+
.PHONY: operator-local
4245
operator-local:
4346
@$(MAKE) operator-stop || true
4447
@./dev/operator_local.sh --operator-only || true
4548

4649
# configure kubectl to point to the cluster specified in dev/config/cluster.yaml
50+
.PHONY: kubectl
4751
kubectl:
4852
@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
4953

54+
.PHONY: cluster-up
5055
cluster-up:
5156
@$(MAKE) registry-all
5257
@$(MAKE) cli
5358
@kill $(shell pgrep -f rerun) >/dev/null 2>&1 || true
5459
@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"
5560
@$(MAKE) kubectl
5661

62+
.PHONY: cluster-up-y
5763
cluster-up-y:
5864
@$(MAKE) registry-all
5965
@$(MAKE) cli
6066
@kill $(shell pgrep -f rerun) >/dev/null 2>&1 || true
6167
@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"
6268
@$(MAKE) kubectl
6369

70+
.PHONY: cluster-down
6471
cluster-down:
6572
@$(MAKE) manager-local
6673
@$(MAKE) cli
6774
@kill $(shell pgrep -f rerun) >/dev/null 2>&1 || true
6875
@./bin/cortex cluster down --config=./dev/config/cluster.yaml --aws-key=$$AWS_ACCESS_KEY_ID --aws-secret=$$AWS_SECRET_ACCESS_KEY
6976

77+
.PHONY: cluster-down-y
7078
cluster-down-y:
7179
@$(MAKE) manager-local
7280
@$(MAKE) cli
7381
@kill $(shell pgrep -f rerun) >/dev/null 2>&1 || true
7482
@./bin/cortex cluster down --config=./dev/config/cluster.yaml --aws-key=$$AWS_ACCESS_KEY_ID --aws-secret=$$AWS_SECRET_ACCESS_KEY --yes
7583

84+
.PHONY: cluster-info
7685
cluster-info:
7786
@$(MAKE) manager-local
7887
@$(MAKE) cli
7988
@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"
8089

90+
.PHONY: cluster-configure
8191
cluster-configure:
8292
@$(MAKE) registry-all
8393
@$(MAKE) cli
8494
@kill $(shell pgrep -f rerun) >/dev/null 2>&1 || true
8595
@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"
8696

97+
.PHONY: cluster-configure-y
8798
cluster-configure-y:
8899
@$(MAKE) registry-all
89100
@$(MAKE) cli
90101
@kill $(shell pgrep -f rerun) >/dev/null 2>&1 || true
91102
@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"
92103

93104
# stop the in-cluster operator
105+
.PHONY: operator-stop
94106
operator-stop:
95107
@$(MAKE) kubectl
96108
@kubectl delete --namespace=default --ignore-not-found=true deployment operator
97109

98110
# Docker images
99111

112+
.PHONY: registry-all
100113
registry-all:
101114
@./dev/registry.sh update all
115+
.PHONY: registry-all-local
102116
registry-all-local:
103117
@./dev/registry.sh update all --skip-push
118+
.PHONY: registry-all-slim
104119
registry-all-slim:
105120
@./dev/registry.sh update all --include-slim
121+
.PHONY: registry-all-slim-local
106122
registry-all-slim-local:
107123
@./dev/registry.sh update all --include-slim --skip-push
124+
.PHONY: registry-all-local-slim
108125
registry-all-local-slim:
109126
@./dev/registry.sh update all --include-slim --skip-push
110127

128+
.PHONY: registry-dev
111129
registry-dev:
112130
@./dev/registry.sh update dev
131+
.PHONY: registry-dev-local
113132
registry-dev-local:
114133
@./dev/registry.sh update dev --skip-push
134+
.PHONY: registry-dev-slim
115135
registry-dev-slim:
116136
@./dev/registry.sh update dev --include-slim
137+
.PHONY: registry-dev-slim-local
117138
registry-dev-slim-local:
118139
@./dev/registry.sh update dev --include-slim --skip-push
140+
.PHONY: registry-dev-local-slim
119141
registry-dev-local-slim:
120142
@./dev/registry.sh update dev --include-slim --skip-push
121143

144+
.PHONY: registry-api
122145
registry-api:
123146
@./dev/registry.sh update api
147+
.PHONY: registry-api-local
124148
registry-api-local:
125149
@./dev/registry.sh update api --skip-push
150+
.PHONY: registry-api-slim
126151
registry-api-slim:
127152
@./dev/registry.sh update api --include-slim
153+
.PHONY: registry-api-slim-local
128154
registry-api-slim-local:
129155
@./dev/registry.sh update api --include-slim --skip-push
156+
.PHONY: registry-api-local-slim
130157
registry-api-local-slim:
131158
@./dev/registry.sh update api --include-slim --skip-push
132159

160+
.PHONY: registry-create
133161
registry-create:
134162
@./dev/registry.sh create
135163

164+
.PHONY: registry-clean
136165
registry-clean:
137166
@./dev/registry.sh clean
138167

168+
.PHONY: manager-local
139169
manager-local:
140170
@./dev/registry.sh update-manager-local
141171

142172
# Misc
143173

174+
.PHONY: aws-clear-bucket
144175
aws-clear-bucket:
145176
@./dev/aws.sh clear-bucket
146177

178+
.PHONY: tools
147179
tools:
148180
@go get -u -v golang.org/x/lint/golint
149181
@go get -u -v github.com/VojtechVitek/rerun/cmd/rerun
150182
@python3 -m pip install black 'pydoc-markdown>=3.0.0,<4.0.0'
151183
@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
152184

185+
.PHONY: format
153186
format:
154187
@./dev/format.sh
155188

156189
#########
157190
# Tests #
158191
#########
159192

193+
.PHONY: test
160194
test:
161195
@./build/test.sh
162196

197+
.PHONY: test-go
163198
test-go:
164199
@./build/test.sh go
165200

201+
.PHONY: test-python
166202
test-python:
167203
@./build/test.sh python
168204

205+
.PHONY: lint
169206
lint:
170207
@./build/lint.sh
171208

209+
.PHONY: test-examples
172210
test-examples:
173211
@$(MAKE) registry-all
174212
@./build/test-examples.sh
@@ -177,14 +215,18 @@ test-examples:
177215
# CI Commands #
178216
###############
179217

218+
.PHONY: ci-build-images
180219
ci-build-images:
181220
@./build/build-images.sh
182221

222+
.PHONY: ci-push-images
183223
ci-push-images:
184224
@./build/push-images.sh
185225

226+
.PHONY: ci-build-cli
186227
ci-build-cli:
187228
@./build/cli.sh
188229

230+
.PHONY: ci-build-and-upload-cli
189231
ci-build-and-upload-cli:
190232
@./build/cli.sh upload

0 commit comments

Comments
 (0)