diff --git a/Makefile b/Makefile index 4ab43bb..e3c81bf 100644 --- a/Makefile +++ b/Makefile @@ -1,14 +1,31 @@ RELEASE_VERSION ?= latest +include ./Makefile.os + SUBDIRS=kafka/consumer kafka/producer kafka/streams kafka/admin http/http-consumer http/http-producer DOCKER_TARGETS=docker_build docker_push docker_tag all: $(SUBDIRS) build: $(SUBDIRS) clean: $(SUBDIRS) +release: release_examples release_maven + $(DOCKER_TARGETS): $(SUBDIRS) $(SUBDIRS): $(MAKE) -C $@ $(MAKECMDGOALS) +next_version: + mvn versions:set -DnewVersion=$(shell echo $(NEXT_VERSION) | tr a-z A-Z) + mvn versions:commit + +release_examples: + echo "Changing images in examples to: $(RELEASE_VERSION)" + $(FIND) ./examples -name '*.yaml' -type f -exec $(SED) -i '/image: "\?quay.io\/strimzi-test-clients\/[a-zA-Z0-9_.-]\?\+:[a-zA-Z0-9_.-]\+-kafka-[0-9.]\+"\?/s/:[a-zA-Z0-9_.-]\+-kafka-\([0-9.]\+\)/:$(RELEASE_VERSION)-kafka-\1/g' {} \; + +release_maven: + echo "Update pom versions to: $(RELEASE_VERSION)" + mvn versions:set -DnewVersion=$(shell echo $(RELEASE_VERSION) | tr a-z A-Z) + mvn versions:commit + .PHONY: all $(SUBDIRS) $(DOCKER_TARGETS) \ No newline at end of file diff --git a/Makefile.os b/Makefile.os new file mode 100644 index 0000000..e0c0c6f --- /dev/null +++ b/Makefile.os @@ -0,0 +1,9 @@ +FIND = find +SED = sed + +UNAME_S := $(shell uname -s) + +ifeq ($(UNAME_S),Darwin) + FIND = gfind + SED = gsed +endif \ No newline at end of file diff --git a/examples/http/http-consumer.yaml b/examples/http/http-consumer.yaml index 6a41a34..ccd4654 100644 --- a/examples/http/http-consumer.yaml +++ b/examples/http/http-consumer.yaml @@ -34,7 +34,7 @@ spec: value: "100" - name: LOG_LEVEL value: DEBUG - image: quay.io/strimzi-test-clients/test-client-http-consumer:latest + image: quay.io/strimzi-test-clients/test-client-http-consumer:latest-kafka-3.0.0 imagePullPolicy: IfNotPresent name: http-consumer restartPolicy: "Never" \ No newline at end of file diff --git a/examples/http/http-producer.yaml b/examples/http/http-producer.yaml index f7d38c6..f8a5173 100644 --- a/examples/http/http-producer.yaml +++ b/examples/http/http-producer.yaml @@ -32,7 +32,7 @@ spec: value: "100" - name: LOG_LEVEL value: DEBUG - image: quay.io/strimzi-test-clients/test-client-http-producer:latest + image: quay.io/strimzi-test-clients/test-client-http-producer:latest-kafka-3.0.0 imagePullPolicy: IfNotPresent name: http-producer restartPolicy: "Never" \ No newline at end of file diff --git a/examples/kafka/admin-client/alter-topics.yaml b/examples/kafka/admin-client/alter-topics.yaml index c1eb1e8..d7cb5a1 100644 --- a/examples/kafka/admin-client/alter-topics.yaml +++ b/examples/kafka/admin-client/alter-topics.yaml @@ -32,7 +32,7 @@ spec: value: "100" - name: LOG_LEVEL value: DEBUG - image: quay.io/strimzi-test-clients/test-client-kafka-admin:latest + image: quay.io/strimzi-test-clients/test-client-kafka-admin:latest-kafka-3.0.0 imagePullPolicy: IfNotPresent name: alter-admin-client restartPolicy: "Never" \ No newline at end of file diff --git a/examples/kafka/admin-client/create-topics.yaml b/examples/kafka/admin-client/create-topics.yaml index 9dda2e8..60a937d 100644 --- a/examples/kafka/admin-client/create-topics.yaml +++ b/examples/kafka/admin-client/create-topics.yaml @@ -34,7 +34,7 @@ spec: value: "100" - name: LOG_LEVEL value: DEBUG - image: quay.io/strimzi-test-clients/test-client-kafka-admin:latest + image: quay.io/strimzi-test-clients/test-client-kafka-admin:latest-kafka-3.0.0 imagePullPolicy: IfNotPresent name: create-admin-client restartPolicy: "Never" \ No newline at end of file diff --git a/examples/kafka/admin-client/delete-topics.yaml b/examples/kafka/admin-client/delete-topics.yaml index fc987c3..9c57fa0 100644 --- a/examples/kafka/admin-client/delete-topics.yaml +++ b/examples/kafka/admin-client/delete-topics.yaml @@ -30,7 +30,7 @@ spec: value: "100" - name: LOG_LEVEL value: DEBUG - image: quay.io/strimzi-test-clients/test-client-kafka-admin:latest + image: quay.io/strimzi-test-clients/test-client-kafka-admin:latest-kafka-3.0.0 imagePullPolicy: IfNotPresent name: delete-admin-client-1 restartPolicy: "Never" \ No newline at end of file diff --git a/examples/kafka/admin-client/delete-with-offset-scram512.yaml b/examples/kafka/admin-client/delete-with-offset-scram512.yaml index 28eec44..46bfedd 100644 --- a/examples/kafka/admin-client/delete-with-offset-scram512.yaml +++ b/examples/kafka/admin-client/delete-with-offset-scram512.yaml @@ -37,7 +37,7 @@ spec: sasl.mechanism=SCRAM-SHA-512 security.protocol=SASL_PLAINTEXT sasl.jaas.config=org.apache.kafka.common.security.scram.ScramLoginModule required username="test-user" password="myPassword"; - image: quay.io/strimzi-test-clients/test-client-kafka-admin:latest + image: quay.io/strimzi-test-clients/test-client-kafka-admin:latest-kafka-3.0.0 imagePullPolicy: IfNotPresent name: delete-admin-client-offset-scram restartPolicy: "Never" diff --git a/examples/kafka/admin-client/delete-with-offset.yaml b/examples/kafka/admin-client/delete-with-offset.yaml index 917486b..82e6daa 100644 --- a/examples/kafka/admin-client/delete-with-offset.yaml +++ b/examples/kafka/admin-client/delete-with-offset.yaml @@ -32,7 +32,7 @@ spec: value: "200" - name: LOG_LEVEL value: DEBUG - image: quay.io/strimzi-test-clients/test-client-kafka-admin:latest + image: quay.io/strimzi-test-clients/test-client-kafka-admin:latest-kafka-3.0.0 imagePullPolicy: IfNotPresent name: delete-admin-client-with-offset restartPolicy: "Never" diff --git a/examples/kafka/admin-client/list-topics.yaml b/examples/kafka/admin-client/list-topics.yaml index 74add60..884b7c8 100644 --- a/examples/kafka/admin-client/list-topics.yaml +++ b/examples/kafka/admin-client/list-topics.yaml @@ -26,7 +26,7 @@ spec: value: list - name: LOG_LEVEL value: DEBUG - image: quay.io/strimzi-test-clients/test-client-kafka-admin:latest + image: quay.io/strimzi-test-clients/test-client-kafka-admin:latest-kafka-3.0.0 imagePullPolicy: IfNotPresent name: list-admin-client restartPolicy: "Never" diff --git a/examples/kafka/kafka-consumer.yaml b/examples/kafka/kafka-consumer.yaml index 76cb8c3..ece0ca5 100644 --- a/examples/kafka/kafka-consumer.yaml +++ b/examples/kafka/kafka-consumer.yaml @@ -30,7 +30,7 @@ spec: value: my-group - name: LOG_LEVEL value: DEBUG - image: quay.io/strimzi-test-clients/test-client-kafka-consumer:latest + image: quay.io/strimzi-test-clients/test-client-kafka-consumer:latest-kafka-3.0.0 imagePullPolicy: IfNotPresent name: kafka-consumer-client restartPolicy: "Never" \ No newline at end of file diff --git a/examples/kafka/kafka-producer.yaml b/examples/kafka/kafka-producer.yaml index 679837e..45d7fa7 100644 --- a/examples/kafka/kafka-producer.yaml +++ b/examples/kafka/kafka-producer.yaml @@ -34,7 +34,7 @@ spec: value: all - name: LOG_LEVEL value: DEBUG - image: quay.io/strimzi-test-clients/test-client-kafka-producer:latest + image: quay.io/strimzi-test-clients/test-client-kafka-producer:latest-kafka-3.0.0 imagePullPolicy: IfNotPresent name: kafka-producer-client restartPolicy: "Never" \ No newline at end of file diff --git a/examples/kafka/kafka-streams.yaml b/examples/kafka/kafka-streams.yaml index 1dc34aa..9ab1efa 100644 --- a/examples/kafka/kafka-streams.yaml +++ b/examples/kafka/kafka-streams.yaml @@ -28,7 +28,7 @@ spec: value: my-topic - name: TARGET_TOPIC value: my-topic-reversed - image: quay.io/strimzi-test-clients/test-client-kafka-streams:latest + image: quay.io/strimzi-test-clients/test-client-kafka-streams:latest-kafka-3.0.0 imagePullPolicy: IfNotPresent name: kafka-streams-client restartPolicy: "Never" \ No newline at end of file