From 63ac127b6b4bbfe7ee7d452ee3bda6b05359a15a Mon Sep 17 00:00:00 2001 From: Oliver Drotbohm Date: Tue, 21 Sep 2021 16:48:43 +0200 Subject: [PATCH] Tweak CI build to run compatibility builds against JDK 17. Issue #2068. --- Jenkinsfile | 14 +++++++------- .../Dockerfile | 4 +++- 2 files changed, 10 insertions(+), 8 deletions(-) rename ci/{openjdk16-mongodb-4.4 => openjdk17-mongodb-4.4}/Dockerfile (88%) diff --git a/Jenkinsfile b/Jenkinsfile index e1ec038ed..8ec49aaa3 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -47,16 +47,16 @@ pipeline { } } } - stage('Publish JDK 16 + MongoDB 4.4') { + stage('Publish JDK 17/ + MongoDB 4.4') { when { - changeset "ci/openjdk16-mongodb-4.4/**" + changeset "ci/openjdk17-mongodb-4.4/**" } agent { label 'data' } options { timeout(time: 30, unit: 'MINUTES') } steps { script { - def image = docker.build("springci/spring-data-rest-openjdk16-with-mongodb-4.4", "ci/openjdk16-mongodb-4.4/") + def image = docker.build("springci/spring-data-rest-openjdk17-with-mongodb-4.4", "ci/openjdk17-mongodb-4.4/") docker.withRegistry('', 'hub.docker.com-springbuildmaster') { image.push() } @@ -127,7 +127,7 @@ pipeline { } } } - stage("test: baseline (jdk16)") { + stage("test: baseline (JDK 17)") { agent { label 'data' } @@ -138,7 +138,7 @@ pipeline { steps { script { docker.withRegistry('', 'hub.docker.com-springbuildmaster') { - docker.image('springci/spring-data-rest-openjdk16-with-mongodb-4.4:latest').inside('-v $HOME:/tmp/jenkins-home') { + docker.image('springci/spring-data-rest-openjdk17-with-mongodb-4.4:latest').inside('-v $HOME:/tmp/jenkins-home') { sh 'mkdir -p /tmp/mongodb/db /tmp/mongodb/log' sh 'mongod --dbpath /tmp/mongodb/db --replSet rs0 --fork --logpath /tmp/mongodb/log/mongod.log &' sh 'sleep 10' @@ -173,7 +173,7 @@ pipeline { } } } - stage("test: spring53-next (jdk16)") { + stage("test: spring53-next (JDK 17)") { agent { label 'data' } @@ -184,7 +184,7 @@ pipeline { steps { script { docker.withRegistry('', 'hub.docker.com-springbuildmaster') { - docker.image('springci/spring-data-rest-openjdk16-with-mongodb-4.4:latest').inside('-v $HOME:/tmp/jenkins-home') { + docker.image('springci/spring-data-rest-openjdk17-with-mongodb-4.4:latest').inside('-v $HOME:/tmp/jenkins-home') { sh 'mkdir -p /tmp/mongodb/db /tmp/mongodb/log' sh 'mongod --dbpath /tmp/mongodb/db --replSet rs0 --fork --logpath /tmp/mongodb/log/mongod.log &' sh 'sleep 10' diff --git a/ci/openjdk16-mongodb-4.4/Dockerfile b/ci/openjdk17-mongodb-4.4/Dockerfile similarity index 88% rename from ci/openjdk16-mongodb-4.4/Dockerfile rename to ci/openjdk17-mongodb-4.4/Dockerfile index 7a1e47cf0..fb5accba4 100644 --- a/ci/openjdk16-mongodb-4.4/Dockerfile +++ b/ci/openjdk17-mongodb-4.4/Dockerfile @@ -1,8 +1,10 @@ -FROM adoptopenjdk/openjdk16:latest +FROM openjdk:17-bullseye ENV TZ=Etc/UTC ENV DEBIAN_FRONTEND=noninteractive +RUN RUN sed -i -e 's/http/https/g' /etc/apt/sources.list + RUN set -eux; \ apt-get update && apt-get install -y apt-transport-https apt-utils gnupg2 ; \ apt-key adv --keyserver hkps://keyserver.ubuntu.com:443 --recv 656408E390CFB1F5 ; \