forked from Apicurio/apicurio-registry
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
489 lines (405 loc) · 31.8 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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
# used for mem, sql, mssql & kafkasql.
# 'override' keyword prevents the variable from being overrideen
override DOCKERFILE_LOCATION := ./distro/docker/target/docker
MEM_DOCKERFILE ?= Dockerfile.jvm
SQL_DOCKERFILE ?= Dockerfile.sql.jvm
MSSQL_DOCKERFILE ?= Dockerfile.mssql.jvm
KAFKASQL_DOCKERFILE ?= Dockerfile.kafkasql.jvm
GITOPS_DOCKERFILE ?= Dockerfile.gitops.jvm
DOCKER_BUILD_WORKSPACE ?= $(DOCKERFILE_LOCATION)
# Special variable that sets the default target
.DEFAULT_GOAL := help
# You can override these variables from the command line.
IMAGE_REPO ?= docker.io
IMAGE_GROUP ?= apicurio
IMAGE_TAG ?= latest
IMAGE_PLATFORMS ?= linux/amd64,linux/arm64,linux/s390x,linux/ppc64le
SKIP_TESTS ?= false
INTEGRATION_TESTS_PROFILE ?= ci
BUILD_FLAGS ?=
REGISTRY_IMAGE ?=
# Colour Codes for help message
override RED := \033[0;31m
override BLUE := \033[36m
override NC := \033[0m
override BGreen := \033[1;32m
# run 'make' or 'make help' to get a list of available targets and their description
.PHONY: help
help:
@echo ""
@echo "================================================================="
@printf "$(BGreen)Please use 'make <target>', where target is one of:-$(NC)\n"
@echo "================================================================="
@grep -E '^\.PHONY: [a-zA-Z_-]+ .*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = "(: |##)"}; {printf "\033[36m%-42s\033[0m %s\n", $$2, $$3}'
@echo ""
@echo "================================================================="
@printf "$(BGreen)Variables available for override:-$(NC)\n"
@echo "================================================================="
@printf "$(BLUE)SKIP_TESTS$(NC) Skips Tests. The Default value is '$(SKIP_TESTS)'\n"
@printf "$(BLUE)BUILD_FLAGS$(NC) Additional maven build flags. By Default, it doesn't pass any additional flags.\n"
@printf "$(BLUE)IMAGE_REPO$(NC) Image Repository of the image. Default is '$(IMAGE_REPO)'\n"
@printf "$(BLUE)IMAGE_GROUP$(NC) Image Group of the image. Default is '$(IMAGE_GROUP)'\n"
@printf "$(BLUE)IMAGE_TAG$(NC) Image tag. Default is '$(IMAGE_TAG)'\n"
@printf "$(BLUE)IMAGE_PLATFORMS$(NC) Supported Platforms for Multi-arch Images. Default platforms are '$(IMAGE_PLATFORMS)'\n"
@printf "$(BLUE)DOCKERFILE_LOCATION$(NC) Path to the dockerfile. Default is '$(DOCKERFILE_LOCATION)'\n"
@printf "$(BLUE)DOCKER_BUILD_WORKSPACE$(NC) Image build workspace. Default is '$(DOCKER_BUILD_WORKSPACE)'\n"
@echo ""
.PHONY: build-all ## Builds and test all modules. Variables available for override [SKIP_TESTS, BUILD_FLAGS]
build-all:
@echo "----------------------------------------------------------------------"
@echo " Building All Modules "
@echo "----------------------------------------------------------------------"
./mvnw -T 1.5C clean install --no-transfer-progress -Pprod -Psql -Pmssql -Pkafkasql -Pgitops -DskipTests=$(SKIP_TESTS) $(BUILD_FLAGS)
.PHONY: build-in-memory ## Builds and test in-memory module. Variables available for override [SKIP_TESTS, BUILD_FLAGS]
build-in-memory:
@echo "----------------------------------------------------------------------"
@echo " Building In-memory Module "
@echo "----------------------------------------------------------------------"
./mvnw -T 1.5C clean install --no-transfer-progress -Pprod -DskipTests=$(SKIP_TESTS) $(BUILD_FLAGS)
.PHONY: build-sql ## Builds and test sql module. Variables available for override [SKIP_TESTS, BUILD_FLAGS]
build-sql:
@echo "----------------------------------------------------------------------"
@echo " Building SQL Module "
@echo "----------------------------------------------------------------------"
./mvnw -T 1.5C clean install --no-transfer-progress -Pprod -Psql -Pno-slow-tests -DskipAppTests -DskipTests=$(SKIP_TESTS) $(BUILD_FLAGS)
.PHONY: build-kafkasql ## Builds and test kafkasql module. Variables available for override [SKIP_TESTS, BUILD_FLAGS]
build-kafkasql:
@echo "----------------------------------------------------------------------"
@echo " Building Kafkasql Module "
@echo "----------------------------------------------------------------------"
./mvnw -T 1.5C clean install --no-transfer-progress -Pprod -Pkafkasql -Pno-slow-tests -DskipAppTests -DskipTests=$(SKIP_TESTS) $(BUILD_FLAGS)
.PHONY: build-gitops ## Builds and test gitops module. Variables available for override [SKIP_TESTS, BUILD_FLAGS]
build-gitops:
@echo "----------------------------------------------------------------------"
@echo " Building GitOps Module "
@echo "----------------------------------------------------------------------"
./mvnw -T 1.5C clean install --no-transfer-progress -Pprod -Pgitops -Pno-slow-tests -DskipAppTests -DskipTests=$(SKIP_TESTS) $(BUILD_FLAGS)
.PHONY: build-mem-native ## Builds mem storage variant native executable. Variables available for override [SKIP_TESTS, BUILD_FLAGS]
build-mem-native:
@echo "----------------------------------------------------------------------"
@echo " Building In-Memory Storage Variant Natively "
@echo "----------------------------------------------------------------------"
./mvnw -T 1.5C package --no-transfer-progress -Pnative -Dquarkus.native.container-build=true -Pprod -DskipTests=$(SKIP_TESTS) $(BUILD_FLAGS)
.PHONY: build-sql-native ## Builds sql storage variant native executable. Variables available for override [SKIP_TESTS, BUILD_FLAGS]
build-sql-native:
@echo "----------------------------------------------------------------------"
@echo " Building SQL Storage Variant Natively "
@echo "----------------------------------------------------------------------"
./mvnw -T 1.5C package --no-transfer-progress -Pnative -Dquarkus.native.container-build=true -Pprod -Psql -pl storage/sql -DskipAppTests -DskipTests=$(SKIP_TESTS) $(BUILD_FLAGS)
.PHONY: build-kafkasql-native ## Builds kafkasql storage variant native executable. Variables available for override [SKIP_TESTS, BUILD_FLAGS]
build-kafkasql-native:
@echo "----------------------------------------------------------------------"
@echo " Building Kafkasql Storage Variant Natively "
@echo "----------------------------------------------------------------------"
./mvnw -T 1.5C package --no-transfer-progress -Pnative -Dquarkus.native.container-build=true -Pprod -Pkafkasql -pl storage/kafkasql -DskipAppTests -DskipTests=$(SKIP_TESTS) $(BUILD_FLAGS)
.PHONY: build-gitops-native ## Builds gitops storage variant native executable. Variables available for override [SKIP_TESTS, BUILD_FLAGS]
build-gitops-native:
@echo "----------------------------------------------------------------------"
@echo " Building GitOps Storage Variant Natively "
@echo "----------------------------------------------------------------------"
./mvnw -T 1.5C package --no-transfer-progress -Pnative -Dquarkus.native.container-build=true -Pprod -Pgitops -pl storage/gitops -DskipAppTests -DskipTests=$(SKIP_TESTS) $(BUILD_FLAGS)
.PHONY: build-mem-image ## Builds docker image for 'in-memory' storage variant. Variables available for override [MEM_DOCKERFILE, IMAGE_REPO, IMAGE_TAG, DOCKER_BUILD_WORKSPACE]
build-mem-image:
@echo "------------------------------------------------------------------------"
@echo " Building Image For In-Memory Storage Variant"
@echo " Repository: $(IMAGE_REPO)"
@echo " Tag: $(IMAGE_TAG)"
@echo "------------------------------------------------------------------------"
docker build -f $(DOCKERFILE_LOCATION)/$(MEM_DOCKERFILE) -t $(IMAGE_REPO)/$(IMAGE_GROUP)/apicurio-registry-mem:$(IMAGE_TAG) $(DOCKER_BUILD_WORKSPACE)
.PHONY: push-mem-image ## Pushes docker image for 'in-memory' storage variant. Variables available for override [IMAGE_REPO, IMAGE_TAG]
push-mem-image:
@echo "------------------------------------------------------------------------"
@echo " Pushing Image For In-Memory Storage Variant"
@echo " Repository: $(IMAGE_REPO)"
@echo " Tag: $(IMAGE_TAG)"
@echo "------------------------------------------------------------------------"
docker push $(IMAGE_REPO)/$(IMAGE_GROUP)/apicurio-registry-mem:$(IMAGE_TAG)
.PHONY: build-mem-native-image ## Builds native docker image for 'mem' storage variant. Variables available for override [IMAGE_REPO, IMAGE_TAG]
build-mem-native-image:
@echo "------------------------------------------------------------------------"
@echo " Building Image For In-Memory Storage Variant (using Native Executable)"
@echo " Repository: $(IMAGE_REPO)"
@echo " Tag: $(IMAGE_TAG)"
@echo "------------------------------------------------------------------------"
docker build -f $(DOCKERFILE_LOCATION)/Dockerfile.native -t $(IMAGE_REPO)/$(IMAGE_GROUP)/apicurio-registry-mem-native:$(IMAGE_TAG) app/
.PHONY: build-mem-native-scratch-image ## Builds native docker image from scratch for 'mem' storage variant. Variables available for override [IMAGE_REPO, IMAGE_TAG]
build-mem-native-scratch-image:
@echo "------------------------------------------------------------------------"
@echo " Building Image For In-Memory Storage Variant (using Native Executable)"
@echo " Repository: $(IMAGE_REPO)"
@echo " Tag: $(IMAGE_TAG)"
@echo "------------------------------------------------------------------------"
docker build -f $(DOCKERFILE_LOCATION)/Dockerfile.native-scratch -t $(IMAGE_REPO)/$(IMAGE_GROUP)/apicurio-registry-mem-native-scratch:$(IMAGE_TAG) ./
.PHONY: push-mem-native-image ## Pushes native docker image for 'mem' storage variant. Variables available for override [IMAGE_REPO, IMAGE_TAG]
push-mem-native-image:
@echo "------------------------------------------------------------------------"
@echo " Pushing Image For In-Memory Storage Variant (using Native Executable)"
@echo " Repository: $(IMAGE_REPO)"
@echo " Tag: $(IMAGE_TAG)"
@echo "------------------------------------------------------------------------"
docker push $(IMAGE_REPO)/$(IMAGE_GROUP)/apicurio-registry-mem-native:$(IMAGE_TAG)
.PHONY: build-sql-image ## Builds docker image for 'sql' storage variant. Variables available for override [SQL_DOCKERFILE, IMAGE_REPO, IMAGE_TAG, DOCKER_BUILD_WORKSPACE]
build-sql-image:
@echo "------------------------------------------------------------------------"
@echo " Building Image For SQL Storage Variant "
@echo " Repository: $(IMAGE_REPO)"
@echo " Tag: $(IMAGE_TAG)"
@echo "------------------------------------------------------------------------"
docker build -f $(DOCKERFILE_LOCATION)/$(SQL_DOCKERFILE) -t $(IMAGE_REPO)/$(IMAGE_GROUP)/apicurio-registry-sql:$(IMAGE_TAG) $(DOCKER_BUILD_WORKSPACE)
.PHONY: push-sql-image ## Pushes docker image for 'sql' storage variant. Variables available for override [IMAGE_REPO, IMAGE_TAG]
push-sql-image:
@echo "------------------------------------------------------------------------"
@echo " Pushing Image For SQL Storage Variant"
@echo " Repository: $(IMAGE_REPO)"
@echo " Tag: $(IMAGE_TAG)"
@echo "------------------------------------------------------------------------"
docker push $(IMAGE_REPO)/$(IMAGE_GROUP)/apicurio-registry-sql:$(IMAGE_TAG)
.PHONY: build-sql-native-image ## Builds native docker image for 'sql' storage variant. Variables available for override [IMAGE_REPO, IMAGE_TAG]
build-sql-native-image:
@echo "------------------------------------------------------------------------"
@echo " Building Image For SQL Storage Variant (using Native Executable)"
@echo " Repository: $(IMAGE_REPO)"
@echo " Tag: $(IMAGE_TAG)"
@echo "------------------------------------------------------------------------"
docker build -f $(DOCKERFILE_LOCATION)/Dockerfile.native -t $(IMAGE_REPO)/$(IMAGE_GROUP)/apicurio-registry-sql-native:$(IMAGE_TAG) storage/sql
.PHONY: push-sql-native-image ## Pushes native docker image for 'sql' storage variant. Variables available for override [IMAGE_REPO, IMAGE_TAG]
push-sql-native-image:
@echo "------------------------------------------------------------------------"
@echo " Pushing Image For SQL Storage Variant (using Native Executable)"
@echo " Repository: $(IMAGE_REPO)"
@echo " Tag: $(IMAGE_TAG)"
@echo "------------------------------------------------------------------------"
docker push $(IMAGE_REPO)/$(IMAGE_GROUP)/apicurio-registry-sql-native:$(IMAGE_TAG)
.PHONY: build-mssql-image ## Builds docker image for 'mssql' storage variant. Variables available for override [MSSQL_DOCKERFILE, IMAGE_REPO, IMAGE_TAG, DOCKER_BUILD_WORKSPACE]
build-mssql-image:
@echo "------------------------------------------------------------------------"
@echo " Building Image For MSSQL Storage Variant "
@echo " Repository: $(IMAGE_REPO)"
@echo " Tag: $(IMAGE_TAG)"
@echo "------------------------------------------------------------------------"
docker build -f $(DOCKERFILE_LOCATION)/$(MSSQL_DOCKERFILE) -t $(IMAGE_REPO)/$(IMAGE_GROUP)/apicurio-registry-mssql:$(IMAGE_TAG) $(DOCKER_BUILD_WORKSPACE)
.PHONY: push-mssql-image ## Pushes docker image for 'mssql' storage variant. Variables available for override [IMAGE_REPO, IMAGE_TAG]
push-mssql-image:
@echo "------------------------------------------------------------------------"
@echo " Pushing Image For MSSQL Storage Variant"
@echo " Repository: $(IMAGE_REPO)"
@echo " Tag: $(IMAGE_TAG)"
@echo "------------------------------------------------------------------------"
docker push $(IMAGE_REPO)/$(IMAGE_GROUP)/apicurio-registry-mssql:$(IMAGE_TAG)
.PHONY: build-kafkasql-image ## Builds docker image for kafkasql storage variant. Variables available for override [KAFKASQL_DOCKERFILE, IMAGE_REPO, IMAGE_TAG, DOCKER_BUILD_WORKSPACE]
build-kafkasql-image:
@echo "------------------------------------------------------------------------"
@echo " Building Image For Kafkasql Storage Variant "
@echo " Repository: $(IMAGE_REPO)"
@echo " Tag: $(IMAGE_TAG)"
@echo "------------------------------------------------------------------------"
docker build -f $(DOCKERFILE_LOCATION)/$(KAFKASQL_DOCKERFILE) -t $(IMAGE_REPO)/$(IMAGE_GROUP)/apicurio-registry-kafkasql:$(IMAGE_TAG) $(DOCKER_BUILD_WORKSPACE)
.PHONY: push-kafkasql-image ## Pushes docker image for 'kafkasql' storage variant. Variables available for override [IMAGE_REPO, IMAGE_TAG]
push-kafkasql-image:
@echo "------------------------------------------------------------------------"
@echo " Pushing Image For Kafkasql Storage Variant"
@echo " Repository: $(IMAGE_REPO)"
@echo " Tag: $(IMAGE_TAG)"
@echo "------------------------------------------------------------------------"
docker push $(IMAGE_REPO)/$(IMAGE_GROUP)/apicurio-registry-kafkasql:$(IMAGE_TAG)
.PHONY: build-kafkasql-native-image ## Builds native docker image for kafkasql storage variant. Variables available for override [IMAGE_REPO, IMAGE_TAG]
build-kafkasql-native-image:
@echo "------------------------------------------------------------------------"
@echo " Building Image For Kafkasql Storage Variant (using Native Executable)"
@echo " Repository: $(IMAGE_REPO)"
@echo " Tag: $(IMAGE_TAG)"
@echo "------------------------------------------------------------------------"
docker build -f $(DOCKERFILE_LOCATION)/Dockerfile.native -t $(IMAGE_REPO)/$(IMAGE_GROUP)/apicurio-registry-kafkasql-native:$(IMAGE_TAG) storage/kafkasql
.PHONY: push-kafkasql-native-image ## Pushes native docker image for 'kafkasql' storage variant. Variables available for override [IMAGE_REPO, IMAGE_TAG]
push-kafkasql-native-image:
@echo "------------------------------------------------------------------------"
@echo " Pushing Image For Kafkasql Storage Variant (using Native Executable)"
@echo " Repository: $(IMAGE_REPO)"
@echo " Tag: $(IMAGE_TAG)"
@echo "------------------------------------------------------------------------"
docker push $(IMAGE_REPO)/$(IMAGE_GROUP)/apicurio-registry-kafkasql-native:$(IMAGE_TAG)
.PHONY: build-gitops-image ## Builds docker image for gitops storage variant. Variables available for override [KAFKASQL_DOCKERFILE, IMAGE_REPO, IMAGE_TAG, DOCKER_BUILD_WORKSPACE]
build-gitops-image:
@echo "------------------------------------------------------------------------"
@echo " Building Image For GitOps Storage Variant "
@echo " Repository: $(IMAGE_REPO)"
@echo " Tag: $(IMAGE_TAG)"
@echo "------------------------------------------------------------------------"
docker build -f $(DOCKERFILE_LOCATION)/$(GITOPS_DOCKERFILE) -t $(IMAGE_REPO)/apicurio/apicurio-registry-gitops:$(IMAGE_TAG) $(DOCKER_BUILD_WORKSPACE)
.PHONY: push-gitops-image ## Pushes docker image for gitops storage variant. Variables available for override [IMAGE_REPO, IMAGE_TAG]
push-gitops-image:
@echo "------------------------------------------------------------------------"
@echo " Pushing Image For GitOps Storage Variant"
@echo " Repository: $(IMAGE_REPO)"
@echo " Tag: $(IMAGE_TAG)"
@echo "------------------------------------------------------------------------"
docker push $(IMAGE_REPO)/apicurio/apicurio-registry-gitops:$(IMAGE_TAG)
.PHONY: build-gitops-native-image ## Builds native docker image for gitops storage variant. Variables available for override [IMAGE_REPO, IMAGE_TAG]
build-gitops-native-image:
@echo "------------------------------------------------------------------------"
@echo " Building Image For GitOps Storage Variant (using Native Executable)"
@echo " Repository: $(IMAGE_REPO)"
@echo " Tag: $(IMAGE_TAG)"
@echo "------------------------------------------------------------------------"
docker build -f $(DOCKERFILE_LOCATION)/Dockerfile.native -t $(IMAGE_REPO)/$(IMAGE_GROUP)/apicurio-registry-gitops-native:$(IMAGE_TAG) storage/gitops
.PHONY: push-gitops-native-image ## Pushes native docker image for gitops storage variant. Variables available for override [IMAGE_REPO, IMAGE_TAG]
push-gitops-native-image:
@echo "------------------------------------------------------------------------"
@echo " Pushing Image For GitOps Storage Variant (using Native Executable)"
@echo " Repository: $(IMAGE_REPO)"
@echo " Tag: $(IMAGE_TAG)"
@echo "------------------------------------------------------------------------"
docker push $(IMAGE_REPO)/$(IMAGE_GROUP)/apicurio-registry-gitops-native:$(IMAGE_TAG)
.PHONY: build-all-images ## Builds all the Images. Variables available for override [IMAGE_REPO, IMAGE_TAG]
build-all-images: build-mem-image build-sql-image build-mssql-image build-kafkasql-image build-gitops-image
.PHONY: push-all-images ## Pushes all the Images. Variables available for override [IMAGE_REPO, IMAGE_TAG]
push-all-images: push-mem-image push-sql-image push-mssql-image push-kafkasql-image push-gitops-image
.PHONY: mem-multiarch-images ## Builds and pushes multi-arch images for 'in-memory' storage variant. Variables available for override [MEM_DOCKERFILE, IMAGE_REPO, IMAGE_TAG, DOCKER_BUILD_WORKSPACE]
mem-multiarch-images:
@echo "------------------------------------------------------------------------"
@echo " Building Multi-arch Images For In-Memory Storage Variant"
@echo " Supported Platforms: $(IMAGE_PLATFORMS)"
@echo " Repository: $(IMAGE_REPO)"
@echo " Tag: $(IMAGE_TAG)"
@echo "------------------------------------------------------------------------"
docker buildx build --push -f $(DOCKERFILE_LOCATION)/$(MEM_DOCKERFILE) -t $(IMAGE_REPO)/$(IMAGE_GROUP)/apicurio-registry-mem:$(IMAGE_TAG) --platform $(IMAGE_PLATFORMS) $(DOCKER_BUILD_WORKSPACE)
.PHONY: sql-multiarch-images ## Builds and pushes multi-arch images for 'sql' storage variant. Variables available for override [SQL_DOCKERFILE, IMAGE_REPO, IMAGE_TAG, DOCKER_BUILD_WORKSPACE]
sql-multiarch-images:
@echo "------------------------------------------------------------------------"
@echo " Building Multi-arch Images For SQL Storage Variant "
@echo " Supported Platforms: $(IMAGE_PLATFORMS)"
@echo " Repository: $(IMAGE_REPO)"
@echo " Tag: $(IMAGE_TAG)"
@echo "------------------------------------------------------------------------"
docker buildx build --push -f $(DOCKERFILE_LOCATION)/$(SQL_DOCKERFILE) -t $(IMAGE_REPO)/$(IMAGE_GROUP)/apicurio-registry-sql:$(IMAGE_TAG) --platform $(IMAGE_PLATFORMS) $(DOCKER_BUILD_WORKSPACE)
.PHONY: mssql-multiarch-images ## Builds and pushes multi-arch images for 'mssql' storage variant. Variables available for override [MSSQL_DOCKERFILE, IMAGE_REPO, IMAGE_TAG, DOCKER_BUILD_WORKSPACE]
mssql-multiarch-images:
@echo "------------------------------------------------------------------------"
@echo " Building Multi-arch Images For SQL Server Storage Variant "
@echo " Supported Platforms: $(IMAGE_PLATFORMS)"
@echo " Repository: $(IMAGE_REPO)"
@echo " Tag: $(IMAGE_TAG)"
@echo "------------------------------------------------------------------------"
docker buildx build --push -f $(DOCKERFILE_LOCATION)/$(MSSQL_DOCKERFILE) -t $(IMAGE_REPO)/$(IMAGE_GROUP)/apicurio-registry-mssql:$(IMAGE_TAG) --platform $(IMAGE_PLATFORMS) $(DOCKER_BUILD_WORKSPACE)
.PHONY: kafkasql-multiarch-images ## Builds and pushes multi-arch images for kafkasql storage variant. Variables available for override [KAFKASQL_DOCKERFILE, IMAGE_REPO, IMAGE_TAG, DOCKER_BUILD_WORKSPACE]
kafkasql-multiarch-images:
@echo "------------------------------------------------------------------------"
@echo " Building Multi-arch Images For Kafkasql Storage Variant "
@echo " Supported Platforms: $(IMAGE_PLATFORMS)"
@echo " Repository: $(IMAGE_REPO)"
@echo " Tag: $(IMAGE_TAG)"
@echo "------------------------------------------------------------------------"
docker buildx build --push -f $(DOCKERFILE_LOCATION)/$(KAFKASQL_DOCKERFILE) -t $(IMAGE_REPO)/$(IMAGE_GROUP)/apicurio-registry-kafkasql:$(IMAGE_TAG) --platform $(IMAGE_PLATFORMS) $(DOCKER_BUILD_WORKSPACE)
.PHONY: gitops-multiarch-images ## Builds and pushes multi-arch images for gitops storage variant. Variables available for override [KAFKASQL_DOCKERFILE, IMAGE_REPO, IMAGE_TAG, DOCKER_BUILD_WORKSPACE]
gitops-multiarch-images:
@echo "------------------------------------------------------------------------"
@echo " Building Multi-arch Images For GitOps Storage Variant "
@echo " Supported Platforms: $(IMAGE_PLATFORMS)"
@echo " Repository: $(IMAGE_REPO)"
@echo " Tag: $(IMAGE_TAG)"
@echo "------------------------------------------------------------------------"
docker buildx build --push -f $(DOCKERFILE_LOCATION)/$(GITOPS_DOCKERFILE) -t $(IMAGE_REPO)/$(IMAGE_GROUP)/apicurio-registry-gitops:$(IMAGE_TAG) --platform $(IMAGE_PLATFORMS) $(DOCKER_BUILD_WORKSPACE)
.PHONY: mem-native-scratch-image ## Builds and pushes multi-arch images for mem storage variant based on scratch. Variables available for override [MEM_SCRATCH_DOCKERFILE, IMAGE_REPO, IMAGE_TAG, DOCKER_BUILD_WORKSPACE]
mem-native-scratch-image:
@echo "------------------------------------------------------------------------"
@echo " Building Multi-arch Images For Mem Storage Variant on Scratch"
@echo " Supported Platforms: $(IMAGE_PLATFORMS)"
@echo " Repository: $(IMAGE_REPO)"
@echo " Tag: $(IMAGE_TAG)"
@echo "------------------------------------------------------------------------"
docker buildx build --push -f $(DOCKERFILE_LOCATION)/$(MEM_SCRATCH_DOCKERFILE) -t $(IMAGE_REPO)/$(IMAGE_GROUP)/apicurio-registry-mem-native-scratch:$(IMAGE_TAG) --platform $(IMAGE_PLATFORMS) $(DOCKER_BUILD_WORKSPACE)
.PHONY: multiarch-registry-images ## Builds and pushes multi-arch registry images for all variants. Variables available for override [IMAGE_REPO, IMAGE_TAG]
multiarch-registry-images: mem-multiarch-images sql-multiarch-images mssql-multiarch-images kafkasql-multiarch-images mem-native-scratch-image gitops-multiarch-images
.PHONY: run-ui-tests ## Runs ui e2e tests
run-ui-tests:
@echo "----------------------------------------------------------------------"
@echo " Running UI Tests "
@echo "----------------------------------------------------------------------"
./mvnw -am verify --no-transfer-progress -Pintegration-tests $(REGISTRY_IMAGE) -Pui -Premote-sql -pl integration-tests -Dmaven.javadoc.skip=true --no-transfer-progress -DtrimStackTrace=false
############################################# In-Memory Integration Tests #########################################################################
.PHONY: run-in-memory-integration-tests ## Runs mem e2e tests
run-in-memory-integration-tests:
@echo "----------------------------------------------------------------------"
@echo " Running In Memory Integration Tests "
@echo "----------------------------------------------------------------------"
./mvnw verify -am --no-transfer-progress -Pintegration-tests -P$(INTEGRATION_TESTS_PROFILE) $(REGISTRY_IMAGE) -Premote-mem -pl integration-tests -Dmaven.javadoc.skip=true --no-transfer-progress
.PHONY: run-in-memory-auth-tests ## Runs mem auth integration tests
run-in-memory-auth-tests:
@echo "----------------------------------------------------------------------"
@echo " Running In Memory Auth Integration Tests "
@echo "----------------------------------------------------------------------"
./mvnw verify -am --no-transfer-progress -Pintegration-tests -Pauth $(REGISTRY_IMAGE) -Premote-mem -pl integration-tests -Dmaven.javadoc.skip=true --no-transfer-progress
############################################# SQL Integration Tests #########################################################################
.PHONY: run-sql-integration-tests ## Runs sql e2e tests
run-sql-integration-tests:
@echo "----------------------------------------------------------------------"
@echo " Running Sql Integration Tests "
@echo "----------------------------------------------------------------------"
./mvnw verify -am --no-transfer-progress -Pintegration-tests -P$(INTEGRATION_TESTS_PROFILE) $(REGISTRY_IMAGE) -Premote-sql -pl integration-tests -Dmaven.javadoc.skip=true --no-transfer-progress
.PHONY: run-sql-auth-tests ## Runs sql auth integration tests
run-sql-auth-tests:
@echo "----------------------------------------------------------------------"
@echo " Running SQL Auth Integration Tests "
@echo "----------------------------------------------------------------------"
./mvnw verify -am --no-transfer-progress -Pintegration-tests -Pauth $(REGISTRY_IMAGE) -Premote-sql -pl integration-tests -Dmaven.javadoc.skip=true --no-transfer-progress
.PHONY: run-sql-migration-integration-tests ## Runs sql migration integration tests
run-sql-migration-integration-tests:
@echo "----------------------------------------------------------------------"
@echo " Running SQL Migration Integration Tests "
@echo "----------------------------------------------------------------------"
./mvnw verify -am --no-transfer-progress -Pintegration-tests $(REGISTRY_IMAGE) -Pmigration -Premote-sql -pl integration-tests -Dmaven.javadoc.skip=true --no-transfer-progress
############################################# KafkaSql Integration Tests #########################################################################
.PHONY: run-kafkasql-integration-tests ## Runs kafkasql integration tests
run-kafkasql-integration-tests:
@echo "----------------------------------------------------------------------"
@echo " Running KafkaSql Integration Tests "
@echo "----------------------------------------------------------------------"
./mvnw verify -am --no-transfer-progress -Pintegration-tests $(REGISTRY_IMAGE) -P$(INTEGRATION_TESTS_PROFILE) -Premote-kafka -pl integration-tests -Dmaven.javadoc.skip=true --no-transfer-progress
.PHONY: run-kafkasql-migration-integration-tests ## Runs kafkasql migration integration tests
run-kafkasql-migration-integration-tests:
@echo "----------------------------------------------------------------------"
@echo " Running KafkaSQL Migration Integration Tests "
@echo "----------------------------------------------------------------------"
./mvnw verify -am --no-transfer-progress -Pintegration-tests $(REGISTRY_IMAGE) -Pmigration -Premote-kafka -pl integration-tests -Dmaven.javadoc.skip=true --no-transfer-progress
.PHONY: run-kafkasql-auth-tests ## Runs kafkasql auth integration tests
run-kafkasql-auth-tests:
@echo "----------------------------------------------------------------------"
@echo " Running KafkaSQL Auth Integration Tests "
@echo "----------------------------------------------------------------------"
./mvnw verify -am --no-transfer-progress -Pintegration-tests $(REGISTRY_IMAGE) -Pauth -Premote-kafka -pl integration-tests -Dmaven.javadoc.skip=true --no-transfer-progress
############################################# MSSQL Integration Tests #########################################################################
.PHONY: run-mssql-integration-tests ## Runs mssql integration tests
run-mssql-integration-tests:
@echo "----------------------------------------------------------------------"
@echo " Running SQL Server Integration Tests "
@echo "----------------------------------------------------------------------"
./mvnw verify -am --no-transfer-progress -Pintegration-tests $(REGISTRY_IMAGE) -P$(INTEGRATION_TESTS_PROFILE) -Pmssql -pl integration-tests -Dmaven.javadoc.skip=true --no-transfer-progress
.PHONY: run-mssql-clustered-integration-tests ## Runs mssql clustered integration tests
run-mssql-clustered-integration-tests:
@echo "----------------------------------------------------------------------"
@echo " Running SQL Server clustered Integration Tests "
@echo "----------------------------------------------------------------------"
./mvnw verify -am --no-transfer-progress -Pintegration-tests $(REGISTRY_IMAGE) -Pclustered -Pmssql -pl integration-tests -Dmaven.javadoc.skip=true --no-transfer-progress
.PHONY: run-mssql-legacy-tests ## Runs mssql legacy tests
run-mssql-legacy-tests:
@echo "----------------------------------------------------------------------"
@echo " Running SQL Server Legacy Tests "
@echo "----------------------------------------------------------------------"
./mvnw verify -am --no-transfer-progress -Pintegration-tests $(REGISTRY_IMAGE) -P$(INTEGRATION_TESTS_PROFILE) -mssql -pl integration-tests/legacy-tests -Dmaven.javadoc.skip=true --no-transfer-progress
.PHONY: run-mssql-auth-integration-tests ## Runs mssql auth integration tests
run-mssql-auth-integration-tests:
@echo "----------------------------------------------------------------------"
@echo " Running SQL Server Auth Integration Tests "
@echo "----------------------------------------------------------------------"
./mvnw verify -am --no-transfer-progress -Pintegration-tests $(REGISTRY_IMAGE) -Pauth -mssql -pl integration-tests -Dmaven.javadoc.skip=true --no-transfer-progress
.PHONY: run-mssql-migration-integration-tests ## Runs mssql migration integration tests
run-mssql-migration-integration-tests:
@echo "----------------------------------------------------------------------"
@echo " Running SQL Server Migration Integration Tests "
@echo "----------------------------------------------------------------------"
./mvnw verify -am --no-transfer-progress -Pintegration-tests $(REGISTRY_IMAGE) -Pmigration -mssql -pl integration-tests -Dmaven.javadoc.skip=true --no-transfer-progress
.PHONY: integration-tests ## Runs all integration tests [SKIP_TESTS, BUILD_FLAGS]
integration-tests: build-all run-ui-tests run-sql-integration-tests run-mssql-integration-tests run-mssql-clustered-integration-tests run-kafkasql-integration-tests run-sql-migration-integration-tests run-mssql-migration-integration-tests run-kafkasql-migration-integration-tests run-sql-auth-integration-tests run-mssql-auth-integration-tests run-kafkasql-auth-integration-tests run-sql-legacy-tests run-mssql-legacy-tests run-kafkasql-legacy-tests
# Please declare your targets as .PHONY in the format shown below, so that the 'make help' parses the information correctly.
#
# .PHONY: <target-name> ## Description of what target does