|
|
|
|
@ -1,7 +1,7 @@
@@ -1,7 +1,7 @@
|
|
|
|
|
def p = [:] |
|
|
|
|
node { |
|
|
|
|
checkout scm |
|
|
|
|
p = readProperties interpolate: true, file: 'ci/pipeline.properties' |
|
|
|
|
checkout scm |
|
|
|
|
p = readProperties interpolate: true, file: 'ci/pipeline.properties' |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
pipeline { |
|
|
|
|
@ -20,39 +20,39 @@ pipeline {
@@ -20,39 +20,39 @@ pipeline {
|
|
|
|
|
stages { |
|
|
|
|
stage("Docker images") { |
|
|
|
|
parallel { |
|
|
|
|
stage('Publish JDK (main) + MongoDB 5.0') { |
|
|
|
|
stage('Publish JDK (main) + MongoDB 5.0') { |
|
|
|
|
when { |
|
|
|
|
anyOf { |
|
|
|
|
changeset "ci/openjdk17-mongodb-5.0/**" |
|
|
|
|
changeset "ci/pipeline.properties" |
|
|
|
|
} |
|
|
|
|
anyOf { |
|
|
|
|
changeset "ci/openjdk17-mongodb-5.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-5.0:${p['java.main.tag']}", "--build-arg BASE=${p['docker.java.main.image']} --build-arg MONGODB=${p['docker.mongodb.5.0.version']} ci/openjdk8-mongodb-5.0/") |
|
|
|
|
docker.withRegistry('', 'hub.docker.com-springbuildmaster') { |
|
|
|
|
image.push() |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
def image = docker.build("springci/spring-data-with-mongodb-5.0:${p['java.main.tag']}", "--build-arg BASE=${p['docker.java.main.image']} --build-arg MONGODB=${p['docker.mongodb.5.0.version']} ci/openjdk17-mongodb-5.0/") |
|
|
|
|
docker.withRegistry(p['docker.registry'], p['docker.credentials']) { |
|
|
|
|
image.push() |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
stage('Publish JDK (main) + MongoDB 4.4') { |
|
|
|
|
when { |
|
|
|
|
anyOf { |
|
|
|
|
changeset "ci/openjdk17-mongodb-4.4/**" |
|
|
|
|
changeset "ci/pipeline.properties" |
|
|
|
|
} |
|
|
|
|
anyOf { |
|
|
|
|
changeset "ci/openjdk17-mongodb-4.4/**" |
|
|
|
|
changeset "ci/pipeline.properties" |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
agent { label 'data' } |
|
|
|
|
options { timeout(time: 30, unit: 'MINUTES') } |
|
|
|
|
|
|
|
|
|
steps { |
|
|
|
|
script { |
|
|
|
|
def image = docker.build("springci/spring-data-with-mongodb-4.4:${p['java.lts.tag']}", "--build-arg BASE=${p['docker.java.lts.image']} --build-arg MONGODB=${p['docker.mongodb.4.4.version']} ci/openjdk16-mongodb-4.4/") |
|
|
|
|
docker.withRegistry('', 'hub.docker.com-springbuildmaster') { |
|
|
|
|
def image = docker.build("springci/spring-data-with-mongodb-4.4:${p['java.main.tag']}", "--build-arg BASE=${p['docker.java.main.image']} --build-arg MONGODB=${p['docker.mongodb.4.4.version']} ci/openjdk17-mongodb-4.4/") |
|
|
|
|
docker.withRegistry(p['docker.registry'], p['docker.credentials']) { |
|
|
|
|
image.push() |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
@ -78,7 +78,7 @@ pipeline {
@@ -78,7 +78,7 @@ pipeline {
|
|
|
|
|
} |
|
|
|
|
steps { |
|
|
|
|
script { |
|
|
|
|
docker.withRegistry('', 'hub.docker.com-springbuildmaster') { |
|
|
|
|
docker.withRegistry(p['docker.registry'], p['docker.credentials']) { |
|
|
|
|
docker.image("springci/spring-data-with-mongodb-4.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 &' |
|
|
|
|
@ -111,7 +111,7 @@ pipeline {
@@ -111,7 +111,7 @@ pipeline {
|
|
|
|
|
} |
|
|
|
|
steps { |
|
|
|
|
script { |
|
|
|
|
docker.withRegistry('', 'hub.docker.com-springbuildmaster') { |
|
|
|
|
docker.withRegistry(p['docker.registry'], p['docker.credentials']) { |
|
|
|
|
docker.image("springci/spring-data-with-mongodb-4.4:${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 &' |
|
|
|
|
@ -126,28 +126,28 @@ pipeline {
@@ -126,28 +126,28 @@ pipeline {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
stage("test: mongodb 5.0 (main)") { |
|
|
|
|
agent { |
|
|
|
|
label 'data' |
|
|
|
|
} |
|
|
|
|
options { timeout(time: 30, unit: 'MINUTES') } |
|
|
|
|
environment { |
|
|
|
|
ARTIFACTORY = credentials('02bd1690-b54f-4c9f-819d-a77cb7a9822c') |
|
|
|
|
} |
|
|
|
|
steps { |
|
|
|
|
script { |
|
|
|
|
docker.withRegistry('', 'hub.docker.com-springbuildmaster') { |
|
|
|
|
docker.image("springci/spring-data-with-mongodb-5.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 'mongo --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('02bd1690-b54f-4c9f-819d-a77cb7a9822c') |
|
|
|
|
} |
|
|
|
|
steps { |
|
|
|
|
script { |
|
|
|
|
docker.withRegistry(p['docker.registry'], p['docker.credentials']) { |
|
|
|
|
docker.image("springci/spring-data-with-mongodb-5.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 'mongo --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: baseline (LTS)") { |
|
|
|
|
agent { |
|
|
|
|
@ -159,9 +159,8 @@ pipeline {
@@ -159,9 +159,8 @@ pipeline {
|
|
|
|
|
} |
|
|
|
|
steps { |
|
|
|
|
script { |
|
|
|
|
docker.withRegistry('', 'hub.docker.com-springbuildmaster') { |
|
|
|
|
docker.withRegistry(p['docker.registry'], p['docker.credentials']) { |
|
|
|
|
docker.image("springci/spring-data-with-mongodb-4.4:${p['java.lts.tag']}").inside(p['docker.java.inside.basic']) { |
|
|
|
|
alwaysPull true |
|
|
|
|
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' |
|
|
|
|
@ -195,7 +194,7 @@ pipeline {
@@ -195,7 +194,7 @@ pipeline {
|
|
|
|
|
|
|
|
|
|
steps { |
|
|
|
|
script { |
|
|
|
|
docker.withRegistry('', 'hub.docker.com-springbuildmaster') { |
|
|
|
|
docker.withRegistry(p['docker.registry'], p['docker.credentials']) { |
|
|
|
|
docker.image(p['docker.java.main.image']).inside(p['docker.java.inside.basic']) { |
|
|
|
|
sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -v' |
|
|
|
|
sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -s settings.xml -Pci,artifactory ' + |
|
|
|
|
|