Skip to content

Commit 241ecc5

Browse files
committed
Fix Cassandra trunk builds
This patch updates the Maven/JDK base image to something newer that can successfully compile Cassandra trunk. It also adds the "no-checkstyle" option on the ant build command line to avoid situations where "trunk" has a checkstyle issue which fails the builds.
1 parent 79b049e commit 241ecc5

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Changelog for Management API, new PRs should update the `main / unreleased` sect
1010
```
1111

1212
## unreleased
13+
* [BUGFIX] [#684](https://github.com/k8ssandra/management-api-for-apache-cassandra/issues/684) Fix Cassandra trunk builds
1314

1415
## v0.1.108 [2025-08-2020]
1516
* [CHANGE] [#670](https://github.com/k8ssandra/management-api-for-apache-cassandra/issues/670) Update OpenJDK 11 install for UBI based images

cassandra-trunk/Dockerfile-trunk.ubi

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ ENV CASSANDRA_HOME=/opt/cassandra
1212
RUN microdnf install -y --nodocs shadow-utils \
1313
&& groupadd -r cassandra --gid=999 \
1414
&& useradd -m -d "$CASSANDRA_HOME" -r -g cassandra -G root --uid=999 cassandra \
15-
&& microdnf update && rm -rf /var/cache/yum \
15+
&& microdnf update -y && rm -rf /var/cache/yum \
1616
# Install packages needed during install process
1717
&& microdnf install -y tar gzip unzip && microdnf clean all
1818

@@ -34,16 +34,14 @@ RUN mkdir -m 775 ${CDC_AGENT_PATH} && \
3434
#############################################################
3535

3636
# Build and extract Cassandra
37-
FROM --platform=$BUILDPLATFORM maven:3.8.6-openjdk-11-slim AS cass-builder
37+
FROM --platform=$BUILDPLATFORM maven:3-eclipse-temurin-11 AS cass-builder
3838
ARG CASSANDRA_VERSION
3939
ARG COMMITSHA="HEAD"
4040
ARG CASSANDRA_BRANCH="trunk"
4141
ENV CASSANDRA_PATH=/opt/cassandra
4242
ENV CASSANDRA_FILES_PATH=/opt/cassandra_files
4343
WORKDIR /build
4444
RUN set -x \
45-
&& rm -fr /etc/apt/sources.list.d/* \
46-
&& rm -rf /var/lib/apt/lists/* \
4745
&& apt-get update \
4846
&& apt-get install -y --no-install-recommends git ant ant-optional make python3 \
4947
&& git clone -b ${CASSANDRA_BRANCH} --single-branch https://github.com/apache/cassandra.git \
@@ -53,7 +51,7 @@ RUN set -x \
5351
# create an empty javadoc archive so we can skip javadoc generation
5452
&& mkdir -p ./build/ \
5553
&& touch ./build/apache-cassandra-${CASSANDRA_VERSION}-javadoc.jar \
56-
&& ant artifacts mvn-install -Duse.jdk11=true -Dno-javadoc=true -Dant.gen-doc.skip=true \
54+
&& ant artifacts mvn-install -Duse.jdk11=true -Dno-javadoc=true -Dant.gen-doc.skip=true -Dno-checkstyle=true \
5755
&& mkdir -m 775 ${CASSANDRA_PATH} ${CASSANDRA_FILES_PATH} \
5856
&& tar --directory ${CASSANDRA_PATH} --strip-components 1 --gzip --extract --file /build/cassandra/build/apache-cassandra-${CASSANDRA_VERSION}-bin.tar.gz \
5957
&& rm -rf ${CASSANDRA_PATH}/javadoc ${CASSANDRA_PATH}/doc \
@@ -62,7 +60,7 @@ COPY cassandra-trunk/files ${CASSANDRA_FILES_PATH}
6260

6361
#############################################################
6462
# Build the Management API
65-
FROM --platform=$BUILDPLATFORM maven:3.8.6-openjdk-11-slim AS mgmtapi-setup
63+
FROM --platform=$BUILDPLATFORM maven:3-eclipse-temurin-11 AS mgmtapi-setup
6664

6765
WORKDIR /
6866

@@ -141,10 +139,10 @@ ENV CASSANDRA_FILES_PATH=/opt/cassandra_files
141139
RUN microdnf install -y --nodocs shadow-utils \
142140
&& groupadd -r cassandra --gid=999 \
143141
&& useradd -m -d "$CASSANDRA_HOME" -r -g cassandra -G root --uid=999 cassandra \
144-
&& microdnf update && rm -rf /var/cache/yum \
142+
&& microdnf update -y && rm -rf /var/cache/yum \
145143
# Install packages needed during install process
146144
&& microdnf install -y --nodocs java-17-openjdk-headless tzdata-java python3.11 zlib findutils which hostname iproute procps util-linux glibc-langpack-en wget tar \
147-
&& microdnf clean all
145+
&& microdnf clean all -y
148146

149147
# Copy trimmed installation
150148
COPY --from=cass-builder --chown=cassandra:root ${CASSANDRA_PATH} ${CASSANDRA_PATH}

0 commit comments

Comments
 (0)