From 92b01669d8aeb415220f71895adcd4bc401d97d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Kr=C3=A1l?= <53821852+im-konge@users.noreply.github.com> Date: Fri, 9 Dec 2022 10:48:48 +0100 Subject: [PATCH] Move to Java 17 and update few dependencies (#48) * move to java17 and update few deps Signed-off-by: Lukas Kral * update k8s config provider to 1.1.0 Signed-off-by: Lukas Kral Signed-off-by: Lukas Kral --- .azure/build-pipeline.yaml | 6 +++--- .azure/templates/setup_java.yaml | 20 ++++++++++---------- http/http-consumer/Dockerfile | 6 ++++-- http/http-producer/Dockerfile | 6 ++++-- kafka/admin/Dockerfile | 6 ++++-- kafka/consumer/Dockerfile | 6 ++++-- kafka/producer/Dockerfile | 6 ++++-- kafka/streams/Dockerfile | 6 ++++-- pom.xml | 9 +++++---- 9 files changed, 42 insertions(+), 29 deletions(-) diff --git a/.azure/build-pipeline.yaml b/.azure/build-pipeline.yaml index e8cb348..c4e489a 100644 --- a/.azure/build-pipeline.yaml +++ b/.azure/build-pipeline.yaml @@ -19,10 +19,10 @@ jobs: # Strategy for the job strategy: matrix: - 'java-11': + 'java-17': image: 'Ubuntu-18.04' - jdk_version: '11' - jdk_path: '/usr/lib/jvm/java-11-openjdk-amd64' + jdk_version: '17' + jdk_path: '/usr/lib/jvm/java-17-openjdk-amd64' # Set timeout for jobs timeoutInMinutes: 60 # Base system diff --git a/.azure/templates/setup_java.yaml b/.azure/templates/setup_java.yaml index edabcc1..f9d40fa 100644 --- a/.azure/templates/setup_java.yaml +++ b/.azure/templates/setup_java.yaml @@ -1,10 +1,10 @@ # Step to setup JAVA on the agent -# We use openjdk-X, where X is Java version (8 or 11). Images are based on Java 8 +# We use openjdk-X, where X is Java version (11 or 17). Images are based on Java 17 parameters: - name: JDK_PATH - default: '/usr/lib/jvm/java-8-openjdk-amd64' + default: '/usr/lib/jvm/java-17-openjdk-amd64' - name: JDK_VERSION - default: '1.8' + default: '17' steps: - bash: | @@ -12,9 +12,9 @@ steps: displayName: 'Update package list' - bash: | - sudo apt-get install openjdk-8-jdk - displayName: 'Install openjdk8' - condition: eq(variables['JDK_VERSION'], '1.8') + sudo apt-get install openjdk-17-jdk + displayName: 'Install openjdk17' + condition: eq(variables['JDK_VERSION'], '17') - bash: | sudo apt-get install openjdk-11-jdk @@ -22,10 +22,10 @@ steps: condition: eq(variables['JDK_VERSION'], '11') - bash: | - echo "##vso[task.setvariable variable=JAVA_VERSION_BUILD]1.8" - echo "##vso[task.setvariable variable=JAVA_VERSION]1.8.0" - displayName: 'Setup JAVA_VERSION=1.8' - condition: eq(variables['JDK_VERSION'], '1.8') + echo "##vso[task.setvariable variable=JAVA_VERSION_BUILD]17" + echo "##vso[task.setvariable variable=JAVA_VERSION]17" + displayName: 'Setup JAVA_VERSION=17' + condition: eq(variables['JDK_VERSION'], '17') - bash: | echo "##vso[task.setvariable variable=JAVA_VERSION_BUILD]11" diff --git a/http/http-consumer/Dockerfile b/http/http-consumer/Dockerfile index 648ac10..d0e0d10 100644 --- a/http/http-consumer/Dockerfile +++ b/http/http-consumer/Dockerfile @@ -2,12 +2,14 @@ FROM registry.access.redhat.com/ubi8/ubi-minimal:latest USER root +ARG JAVA_VERSION=17 + RUN microdnf update \ - && microdnf install java-11-openjdk-headless shadow-utils \ + && microdnf install java-${JAVA_VERSION}-openjdk-headless shadow-utils \ && microdnf clean all # Set JAVA_HOME env var -ENV JAVA_HOME /usr/lib/jvm/jre-11 +ENV JAVA_HOME /usr/lib/jvm/jre-17 # Add strimzi user with UID 1001 # The user is in the group 0 to have access to the mounted volumes and storage diff --git a/http/http-producer/Dockerfile b/http/http-producer/Dockerfile index db5fba6..c25da89 100644 --- a/http/http-producer/Dockerfile +++ b/http/http-producer/Dockerfile @@ -2,12 +2,14 @@ FROM registry.access.redhat.com/ubi8/ubi-minimal:latest USER root +ARG JAVA_VERSION=17 + RUN microdnf update \ - && microdnf install java-11-openjdk-headless shadow-utils \ + && microdnf install java-${JAVA_VERSION}-openjdk-headless shadow-utils \ && microdnf clean all # Set JAVA_HOME env var -ENV JAVA_HOME /usr/lib/jvm/jre-11 +ENV JAVA_HOME /usr/lib/jvm/jre-17 # Add strimzi user with UID 1001 # The user is in the group 0 to have access to the mounted volumes and storage diff --git a/kafka/admin/Dockerfile b/kafka/admin/Dockerfile index 6a23a0b..d42417d 100644 --- a/kafka/admin/Dockerfile +++ b/kafka/admin/Dockerfile @@ -2,12 +2,14 @@ FROM registry.access.redhat.com/ubi8/ubi-minimal:latest USER root +ARG JAVA_VERSION=17 + RUN microdnf update \ - && microdnf install java-11-openjdk-headless shadow-utils \ + && microdnf install java-${JAVA_VERSION}-openjdk-headless shadow-utils \ && microdnf clean all # Set JAVA_HOME env var -ENV JAVA_HOME /usr/lib/jvm/jre-11 +ENV JAVA_HOME /usr/lib/jvm/jre-17 # Add strimzi user with UID 1001 # The user is in the group 0 to have access to the mounted volumes and storage diff --git a/kafka/consumer/Dockerfile b/kafka/consumer/Dockerfile index 3592bf6..b3ec34b 100644 --- a/kafka/consumer/Dockerfile +++ b/kafka/consumer/Dockerfile @@ -2,12 +2,14 @@ FROM registry.access.redhat.com/ubi8/ubi-minimal:latest USER root +ARG JAVA_VERSION=17 + RUN microdnf update \ - && microdnf install java-11-openjdk-headless shadow-utils \ + && microdnf install java-${JAVA_VERSION}-openjdk-headless shadow-utils \ && microdnf clean all # Set JAVA_HOME env var -ENV JAVA_HOME /usr/lib/jvm/jre-11 +ENV JAVA_HOME /usr/lib/jvm/jre-17 # Add strimzi user with UID 1001 # The user is in the group 0 to have access to the mounted volumes and storage diff --git a/kafka/producer/Dockerfile b/kafka/producer/Dockerfile index 8ebbe88..5f0dc88 100644 --- a/kafka/producer/Dockerfile +++ b/kafka/producer/Dockerfile @@ -2,12 +2,14 @@ FROM registry.access.redhat.com/ubi8/ubi-minimal:latest USER root +ARG JAVA_VERSION=17 + RUN microdnf update \ - && microdnf install java-11-openjdk-headless shadow-utils \ + && microdnf install java-${JAVA_VERSION}-openjdk-headless shadow-utils \ && microdnf clean all # Set JAVA_HOME env var -ENV JAVA_HOME /usr/lib/jvm/jre-11 +ENV JAVA_HOME /usr/lib/jvm/jre-17 # Add strimzi user with UID 1001 # The user is in the group 0 to have access to the mounted volumes and storage diff --git a/kafka/streams/Dockerfile b/kafka/streams/Dockerfile index e0cb835..6befe94 100644 --- a/kafka/streams/Dockerfile +++ b/kafka/streams/Dockerfile @@ -2,12 +2,14 @@ FROM registry.access.redhat.com/ubi8/ubi-minimal:latest USER root +ARG JAVA_VERSION=17 + RUN microdnf update \ - && microdnf install java-11-openjdk-headless shadow-utils \ + && microdnf install java-${JAVA_VERSION}-openjdk-headless shadow-utils \ && microdnf clean all # Set JAVA_HOME env var -ENV JAVA_HOME /usr/lib/jvm/jre-11 +ENV JAVA_HOME /usr/lib/jvm/jre-17 # Add strimzi user with UID 1001 # The user is in the group 0 to have access to the mounted volumes and storage diff --git a/pom.xml b/pom.xml index c09d1b5..fade1e0 100644 --- a/pom.xml +++ b/pom.xml @@ -16,10 +16,11 @@ + 17 + 17 + 3.1.2 - 11 - 11 - 2.17.2 + 2.19.0 1.6.2 3.3.1 0.11.0 @@ -27,7 +28,7 @@ 4.1.72.Final 2.13.1 3.2.1 - 1.0.0 + 1.1.0 1.8.1 0.33.0 0.1.15