From 5382041c6fa47f6b8b13ff9691ac390268093ad3 Mon Sep 17 00:00:00 2001 From: Julia <5765049+sxhinzvc@users.noreply.github.com> Date: Thu, 7 Sep 2023 15:27:13 -0400 Subject: [PATCH] Polishing. Fix spacing format. Closes #4473 Original Pull Request: #4496 --- Jenkinsfile | 72 ++++++++++++++++++++++++++--------------------------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 78417acd3c..51550e2c6b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -97,24 +97,24 @@ pipeline { } } stage('Publish JDK (Java 17) + MongoDB 7.0') { - when { - anyOf { - changeset "ci/openjdk17-mongodb-7.0/**" - changeset "ci/pipeline.properties" - } - } - agent { label 'data' } - options { timeout(time: 30, unit: 'MINUTES') } + when { + anyOf { + changeset "ci/openjdk17-mongodb-7.0/**" + changeset "ci/pipeline.properties" + } + } + agent { label 'data' } + options { timeout(time: 30, unit: 'MINUTES') } - steps { - script { + steps { + script { def image = docker.build("springci/spring-data-with-mongodb-7.0:${p['java.main.tag']}", "--build-arg BASE=${p['docker.java.main.image']} --build-arg MONGODB=${p['docker.mongodb.7.0.version']} ci/openjdk17-mongodb-7.0/") - docker.withRegistry(p['docker.registry'], p['docker.credentials']) { - image.push() - } - } - } - } + docker.withRegistry(p['docker.registry'], p['docker.credentials']) { + image.push() + } + } + } + } stage('Publish JDK (Java 20) + MongoDB 7.0') { when { anyOf { @@ -242,26 +242,26 @@ pipeline { } stage("test: MongoDB 7.0 (main)") { - agent { - label 'data' - } - options { timeout(time: 30, unit: 'MINUTES') } - environment { - ARTIFACTORY = credentials("${p['artifactory.credentials']}") - } - steps { - script { - docker.image("harbor-repo.vmware.com/dockerhub-proxy-cache/springci/spring-data-with-mongodb-7.0:${p['java.main.tag']}").inside(p['docker.java.inside.basic']) { - sh 'mkdir -p /tmp/mongodb/db /tmp/mongodb/log' - sh 'mongod --setParameter transactionLifetimeLimitSeconds=90 --setParameter maxTransactionLockRequestTimeoutMillis=10000 --dbpath /tmp/mongodb/db --replSet rs0 --fork --logpath /tmp/mongodb/log/mongod.log &' - sh 'sleep 10' - sh 'mongosh --eval "rs.initiate({_id: \'rs0\', members:[{_id: 0, host: \'127.0.0.1:27017\'}]});"' - sh 'sleep 15' - 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' - } - } - } - } + agent { + label 'data' + } + options { timeout(time: 30, unit: 'MINUTES') } + environment { + ARTIFACTORY = credentials("${p['artifactory.credentials']}") + } + steps { + script { + docker.image("harbor-repo.vmware.com/dockerhub-proxy-cache/springci/spring-data-with-mongodb-7.0:${p['java.main.tag']}").inside(p['docker.java.inside.basic']) { + sh 'mkdir -p /tmp/mongodb/db /tmp/mongodb/log' + sh 'mongod --setParameter transactionLifetimeLimitSeconds=90 --setParameter maxTransactionLockRequestTimeoutMillis=10000 --dbpath /tmp/mongodb/db --replSet rs0 --fork --logpath /tmp/mongodb/log/mongod.log &' + sh 'sleep 10' + sh 'mongosh --eval "rs.initiate({_id: \'rs0\', members:[{_id: 0, host: \'127.0.0.1:27017\'}]});"' + sh 'sleep 15' + 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' + } + } + } + } stage("test: MongoDB 7.0 (next)") { agent {