Skip to content

Commit

Permalink
chore(ci): fetch kafka 4.0 via tar.gz rather than git
Browse files Browse the repository at this point in the history
Simplify things and avoid the clone depth conundrum by simply grabbing
the source tarball at the specific commit instead.

Signed-off-by: Dominic Evans <[email protected]>
  • Loading branch information
dnwe committed Jan 13, 2025
1 parent d2de074 commit ceb8e18
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Dockerfile.kafka
Original file line number Diff line number Diff line change
Expand Up @@ -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}" \
Expand Down

0 comments on commit ceb8e18

Please sign in to comment.