From ceb8e18235fa4da2f3772f7d53e961a9ed0811b3 Mon Sep 17 00:00:00 2001 From: Dominic Evans Date: Mon, 13 Jan 2025 19:42:46 +0000 Subject: [PATCH] chore(ci): fetch kafka 4.0 via tar.gz rather than git Simplify things and avoid the clone depth conundrum by simply grabbing the source tarball at the specific commit instead. Signed-off-by: Dominic Evans --- Dockerfile.kafka | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Dockerfile.kafka b/Dockerfile.kafka index 915710f6d..58af10a31 100644 --- a/Dockerfile.kafka +++ b/Dockerfile.kafka @@ -29,10 +29,11 @@ RUN --mount=type=bind,target=.,rw=true \ && chmod a+rw "/opt/kafka-${KAFKA_VERSION}" \ && if [ "$KAFKA_VERSION" = "4.0.0" ]; then \ microdnf install -y java-17-openjdk-devel \ - && git clone --depth=1024 --single-branch -b 4.0 https://github.com/apache/kafka /usr/src/kafka \ + && mkdir -p /usr/src/kafka \ + && : PIN TO COMMIT OF 4.0 BRANCH BEFORE KAFKA-17616 ZOOKEEPER REMOVAL STARTED \ + && curl --fail -sSL https://github.com/apache/kafka/archive/d1504649fbe45064a0b0120ff33de9326b2fc662.tar.gz | \ + tar zxf - -C /usr/src/kafka --strip-components=1 \ && cd /usr/src/kafka \ - && : PIN TO COMMIT BEFORE KAFKA-17616 ZOOKEEPER REMOVAL STARTED \ - && git reset --hard d1504649fbe45064a0b0120ff33de9326b2fc662 \ && export JAVA_TOOL_OPTIONS=-XX:MaxRAMPercentage=80 \ && sed -e '/version=/s/-SNAPSHOT//' -e '/org.gradle.jvmargs/d' -e '/org.gradle.parallel/s/true/false/' -i gradle.properties && ./gradlew -PmaxParallelForks=1 -PmaxScalacThreads=1 --no-daemon releaseTarGz -x siteDocsTar -x javadoc \ && tar xzf core/build/distributions/kafka_${SCALA_VERSION}-${KAFKA_VERSION}.tgz --strip-components=1 -C "/opt/kafka-${KAFKA_VERSION}" \