Skip to content

Commit

Permalink
Upgrade MongoDB 8 build to Java.next.
Browse files Browse the repository at this point in the history
Closes #4828
  • Loading branch information
mp911de committed Nov 7, 2024
1 parent c1c9fd0 commit 418125d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 50 deletions.
29 changes: 5 additions & 24 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -96,26 +96,7 @@ pipeline {
}
}
}
stage('Publish JDK (Java.next) + MongoDB 7.0') {
when {
anyOf {
changeset "ci/openjdk21-mongodb-7.0/**"
changeset "ci/pipeline.properties"
}
}
agent { label 'data' }
options { timeout(time: 30, unit: 'MINUTES') }

steps {
script {
def image = docker.build("springci/spring-data-with-mongodb-7.0:${p['java.next.tag']}", "--build-arg BASE=${p['docker.java.next.image']} --build-arg MONGODB=${p['docker.mongodb.7.0.version']} ci/openjdk21-mongodb-7.0/")
docker.withRegistry(p['docker.registry'], p['docker.credentials']) {
image.push()
}
}
}
}
stage('Publish JDK (Java 17) + MongoDB 8.0') {
stage('Publish JDK (Java.next) + MongoDB 8.0') {
when {
anyOf {
changeset "ci/openjdk17-mongodb-8.0/**"
Expand All @@ -127,7 +108,7 @@ pipeline {

steps {
script {
def image = docker.build("springci/spring-data-with-mongodb-8.0:${p['java.main.tag']}", "--build-arg BASE=${p['docker.java.main.image']} --build-arg MONGODB=${p['docker.mongodb.8.0.version']} ci/openjdk17-mongodb-8.0/")
def image = docker.build("springci/spring-data-with-mongodb-8.0:${p['java.next.tag']}", "--build-arg BASE=${p['docker.java.next.image']} --build-arg MONGODB=${p['docker.mongodb.8.0.version']} ci/openjdk17-mongodb-8.0/")
docker.withRegistry(p['docker.registry'], p['docker.credentials']) {
image.push()
}
Expand Down Expand Up @@ -241,7 +222,7 @@ pipeline {
}
}

stage("test: MongoDB 7.0 (next)") {
stage("test: MongoDB 7.0 (main)") {
agent {
label 'data'
}
Expand All @@ -253,7 +234,7 @@ pipeline {
steps {
script {
docker.withRegistry(p['docker.proxy.registry'], p['docker.proxy.credentials']) {
docker.image("springci/spring-data-with-mongodb-7.0:${p['java.next.tag']}").inside(p['docker.java.inside.docker']) {
docker.image("springci/spring-data-with-mongodb-7.0:${p['java.main.tag']}").inside(p['docker.java.inside.docker']) {
sh 'ci/start-replica.sh'
sh 'MAVEN_OPTS="-Duser.name=' + "${p['jenkins.user.name']}" + ' -Duser.home=/tmp/jenkins-home" ' +
"./mvnw -s settings.xml -Ddevelocity.storage.directory=/tmp/jenkins-home/.develocity-root -Dmaven.repo.local=/tmp/jenkins-home/.m2/spring-data-mongodb clean dependency:list test -Dsort -U -B"
Expand All @@ -275,7 +256,7 @@ pipeline {
steps {
script {
docker.withRegistry(p['docker.proxy.registry'], p['docker.proxy.credentials']) {
docker.image("springci/spring-data-with-mongodb-8.0:${p['java.main.tag']}").inside(p['docker.java.inside.docker']) {
docker.image("springci/spring-data-with-mongodb-8.0:${p['java.next.tag']}").inside(p['docker.java.inside.docker']) {
sh 'ci/start-replica.sh'
sh 'MAVEN_OPTS="-Duser.name=' + "${p['jenkins.user.name']}" + ' -Duser.home=/tmp/jenkins-home" ' +
"./mvnw -s settings.xml -Ddevelocity.storage.directory=/tmp/jenkins-home/.develocity-root -Dmaven.repo.local=/tmp/jenkins-home/.m2/spring-data-mongodb clean dependency:list test -Dsort -U -B"
Expand Down
25 changes: 0 additions & 25 deletions ci/openjdk21-mongodb-7.0/Dockerfile

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ RUN set -eux; \
# MongoDB 8.0 release signing key
wget -qO - https://www.mongodb.org/static/pgp/server-8.0.asc | apt-key add - && \
# Needed when MongoDB creates a 8.0 folder.
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/8.0 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-8.0.list && \
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu noble/mongodb-org/8.0 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-8.0.list && \
echo ${TZ} > /etc/timezone

RUN apt-get update && \
Expand Down

0 comments on commit 418125d

Please sign in to comment.