Upgrade Jenkins CI build to JDK 17.

The Jenkinsfile will need to be edited once AdoptOpenJDK releases OpenJDK17.

See #1170.
This commit is contained in:
John Blum
2021-09-20 19:33:11 -07:00
committed by Mark Paluch
parent 29114cb1b6
commit b5f3b8eed8
2 changed files with 58 additions and 88 deletions

View File

@@ -0,0 +1,23 @@
FROM adoptopenjdk/openjdk17:latest
RUN set -eux; \
CASSANDRA_URL='https://www-us.apache.org/dist/cassandra/3.11.10/apache-cassandra-3.11.10-bin.tar.gz'; \
curl -LfsSo /tmp/cassandra.tar.gz ${CASSANDRA_URL}; \
mkdir -p /opt/cassandra /opt/cassandra/data /opt/cassandra/logs; \
cd /opt/cassandra; \
tar -xf /tmp/cassandra.tar.gz --strip-components=1; \
rm -rf /tmp/cassandra.tar.gz; \
chmod -R a+rwx /opt/cassandra; \
useradd -d /home/jenkins-docker -m -u 1001 -U jenkins-docker;
RUN set -eux; \
BINARY_URL='https://github.com/AdoptOpenJDK/openjdk17-binaries/releases/download/jdk17/OpenJDK17-jdk_x64_linux_hotspot_17.tar.gz'; \
curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \
mkdir -p /opt/java/openjdk17; \
cd /opt/java/openjdk17; \
tar -xf /tmp/openjdk.tar.gz --strip-components=1; \
rm -rf /tmp/openjdk.tar.gz;
ENV PATH="/opt/java/openjdk17/bin:$PATH"
ENV MAX_HEAP_SIZE=1500M
ENV HEAP_NEWSIZE=300M