Skip to content

Commit 2f208d7

Browse files
christophstroblmp911de
authored andcommitted
Update CI to cover MongoDB Server 5.0.
MongoDB has alpha releases in a slightly different location on their distribution server. And they use different keys for signing these alpha releases compared to the overall package listing. Closes #3696 Original pull request: #3753.
1 parent 63d9875 commit 2f208d7

File tree

2 files changed

+57
-0
lines changed

2 files changed

+57
-0
lines changed

Jenkinsfile

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,22 @@ pipeline {
1414
stages {
1515
stage("Docker images") {
1616
parallel {
17+
stage('Publish JDK 8 + MongoDB 5.0') {
18+
when {
19+
changeset "ci/openjdk8-mongodb-5.0/**"
20+
}
21+
agent { label 'data' }
22+
options { timeout(time: 30, unit: 'MINUTES') }
23+
24+
steps {
25+
script {
26+
def image = docker.build("springci/spring-data-openjdk8-with-mongodb-5.0.0", "ci/openjdk8-mongodb-5.0/")
27+
docker.withRegistry('', 'hub.docker.com-springbuildmaster') {
28+
image.push()
29+
}
30+
}
31+
}
32+
}
1733
stage('Publish JDK 8 + MongoDB 4.0') {
1834
when {
1935
changeset "ci/openjdk8-mongodb-4.0/**"
@@ -151,6 +167,30 @@ pipeline {
151167
}
152168
}
153169

170+
stage("test: mongodb 5.0 (jdk8)") {
171+
agent {
172+
label 'data'
173+
}
174+
options { timeout(time: 30, unit: 'MINUTES') }
175+
environment {
176+
ARTIFACTORY = credentials('02bd1690-b54f-4c9f-819d-a77cb7a9822c')
177+
}
178+
steps {
179+
script {
180+
docker.withRegistry('', 'hub.docker.com-springbuildmaster') {
181+
docker.image('springci/spring-data-openjdk8-with-mongodb-5.0.0:latest').inside('-v $HOME:/tmp/jenkins-home') {
182+
sh 'mkdir -p /tmp/mongodb/db /tmp/mongodb/log'
183+
sh 'mongod --setParameter transactionLifetimeLimitSeconds=90 --setParameter maxTransactionLockRequestTimeoutMillis=10000 --dbpath /tmp/mongodb/db --replSet rs0 --fork --logpath /tmp/mongodb/log/mongod.log &'
184+
sh 'sleep 10'
185+
sh 'mongo --eval "rs.initiate({_id: \'rs0\', members:[{_id: 0, host: \'127.0.0.1:27017\'}]});"'
186+
sh 'sleep 15'
187+
sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -s settings.xml clean dependency:list test -Duser.name=jenkins -Dsort -U -B'
188+
}
189+
}
190+
}
191+
}
192+
}
193+
154194
stage("test: baseline (jdk16)") {
155195
agent {
156196
label 'data'

ci/openjdk8-mongodb-5.0/Dockerfile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
FROM adoptopenjdk/openjdk8:latest
2+
3+
ENV TZ=Etc/UTC
4+
ENV DEBIAN_FRONTEND=noninteractive
5+
6+
RUN set -eux; \
7+
apt-get update && apt-get install -y apt-transport-https apt-utils gnupg2 wget ; \
8+
# MongoDB 5.0 release signing key
9+
apt-key adv --keyserver hkps://keyserver.ubuntu.com:443 --recv B00A0BD1E2C63C11 ; \
10+
# Needed when MongoDB creates a 5.0 folder.
11+
echo "deb [ arch=amd64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/5.0 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-5.0.list; \
12+
echo ${TZ} > /etc/timezone;
13+
14+
RUN apt-get update; \
15+
apt-get install -y mongodb-org=5.0.0 mongodb-org-server=5.0.0 mongodb-org-shell=5.0.0 mongodb-org-mongos=5.0.0 mongodb-org-tools=5.0.0; \
16+
apt-get clean; \
17+
rm -rf /var/lib/apt/lists/*;

0 commit comments

Comments
 (0)