From 378a93b47ea1ddf76c3e1ecbab11396dfd0f5df4 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Wed, 9 Oct 2024 14:10:34 +0200 Subject: [PATCH] Use Docker in Docker CI setup. See #503 --- Jenkinsfile | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index f89eeb8..714c493 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -37,9 +37,9 @@ pipeline { steps { script { docker.withRegistry(p['docker.proxy.registry'], p['docker.proxy.credentials']) { - docker.image(p['docker.java.main.image']).inside(p['docker.java.inside.basic']) { + docker.image(p['docker.java.main.image']).inside(p['docker.java.inside.docker']) { sh 'MAVEN_OPTS="-Duser.name=' + "${p['jenkins.user.name']}" + ' -Duser.home=/tmp/jenkins-home" ' + - "./mvnw -s settings.xml clean dependency:list test -Dsort -U -B" + "./mvnw -s settings.xml -Ddevelocity.storage.directory=/tmp/jenkins-home/.develocity-root -Dmaven.repo.local=/tmp/jenkins-home/.m2/spring-data-ldap clean dependency:list test -Dsort -U -B" } } } @@ -67,9 +67,9 @@ pipeline { steps { script { docker.withRegistry(p['docker.proxy.registry'], p['docker.proxy.credentials']) { - docker.image(p['docker.java.next.image']).inside(p['docker.java.inside.basic']) { + docker.image(p['docker.java.next.image']).inside(p['docker.java.inside.docker']) { sh 'MAVEN_OPTS="-Duser.name=' + "${p['jenkins.user.name']}" + ' -Duser.home=/tmp/jenkins-home" ' + - "./mvnw -s settings.xml clean dependency:list test -Dsort -U -B" + "./mvnw -s settings.xml -Ddevelocity.storage.directory=/tmp/jenkins-home/.develocity-root -Dmaven.repo.local=/tmp/jenkins-home/.m2/spring-data-ldap clean dependency:list test -Dsort -U -B" } } } @@ -97,16 +97,18 @@ pipeline { steps { script { docker.withRegistry(p['docker.proxy.registry'], p['docker.proxy.credentials']) { - docker.image(p['docker.java.main.image']).inside(p['docker.java.inside.basic']) { + docker.image(p['docker.java.main.image']).inside(p['docker.java.inside.docker']) { sh 'MAVEN_OPTS="-Duser.name=' + "${p['jenkins.user.name']}" + ' -Duser.home=/tmp/jenkins-home" ' + "./mvnw -s settings.xml -Pci,artifactory " + + "-Ddevelocity.storage.directory=/tmp/jenkins-home/.develocity-root " + "-Dartifactory.server=${p['artifactory.url']} " + "-Dartifactory.username=${ARTIFACTORY_USR} " + "-Dartifactory.password=${ARTIFACTORY_PSW} " + "-Dartifactory.staging-repository=${p['artifactory.repository.snapshot']} " + "-Dartifactory.build-name=spring-data-ldap " + "-Dartifactory.build-number=spring-data-ldap-${BRANCH_NAME}-build-${BUILD_NUMBER} " + - '-Dmaven.test.skip=true clean deploy -U -B ' + "-Dmaven.repo.local=/tmp/jenkins-home/.m2/spring-data-ldap " + + "-Dmaven.test.skip=true clean deploy -U -B " } } }