-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathMakefile
70 lines (54 loc) · 2.15 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
##
# Copyright 2023 Aiven Oy
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
##
VERSION := $(shell grep -o -E '^version=[0-9]+\.[0-9]+\.[0-9]+(-SNAPSHOT)?' gradle.properties | cut -c9-)
IMAGE_NAME := aivenoy/kafka-with-ts-plugin
IMAGE_VERSION := latest
IMAGE_TAG := $(IMAGE_NAME):$(IMAGE_VERSION)
.PHONY: all clean checkstyle build test integration_test e2e_test docker_image docker_push
all: clean build test
clean:
./gradlew clean
checkstyle:
./gradlew checkstyleMain checkstyleTest checkstyleIntegrationTest
build: build/distributions/tiered-storage-for-apache-kafka-$(VERSION).tgz storage/s3/build/distributions/s3-$(VERSION).tgz storage/gcs/build/distributions/gcs-$(VERSION).tgz storage/azure/build/distributions/azure-$(VERSION).tgz
build/distributions/tiered-storage-for-apache-kafka-$(VERSION).tgz:
./gradlew build distTar -x test -x integrationTest
storage/s3/build/distributions/s3-$(VERSION).tgz:
./gradlew build :storage:s3:distTar -x test -x integrationTest
storage/gcs/build/distributions/gcs-$(VERSION).tgz:
./gradlew build :storage:gcs:distTar -x test -x integrationTest
storage/azure/build/distributions/azure-$(VERSION).tgz:
./gradlew build :storage:azure:distTar -x test -x integrationTest
.PHONY: docs
docs:
./gradlew :docs:genConfigsDocs
./gradlew :docs:genMetricsDocs
test: build
./gradlew test
integration_test: build
./gradlew integrationTest -x :e2e:integrationTest
E2E_TEST=LocalSystem
e2e_test: build
./gradlew :e2e:integrationTest --tests $(E2E_TEST)*
.PHONY: docker_image
docker_image: build
docker build . \
-f docker/Dockerfile \
--build-arg _VERSION=$(VERSION) \
-t $(IMAGE_TAG)
.PHONY: docker_push
docker_push:
docker push $(IMAGE_TAG)