diff --git a/Jenkinsfile b/Jenkinsfile index 0668742..46d81e4 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -40,36 +40,7 @@ pipeline { script { docker.image(p['docker.java.main.image']).inside(p['docker.java.inside.basic']) { sh 'MAVEN_OPTS="-Duser.name=' + "${p['jenkins.user.name']}" + ' -Duser.home=/tmp/jenkins-home" ' + - "./mvnw -Pwith-bom-client verify -B -U" - } - } - } - } - - stage("Verify other configurations") { - when { - beforeAgent(true) - allOf { - branch(pattern: "main|(\\d+\\.\\d+\\.x)", comparator: "REGEXP") - not { triggeredBy 'UpstreamCause' } - } - } - parallel { - stage("verify (next)") { - agent { - label 'data' - } - options { timeout(time: 30, unit: 'MINUTES') } - environment { - ARTIFACTORY = credentials("${p['artifactory.credentials']}") - } - steps { - script { - docker.image(p['docker.java.next.image']).inside(p['docker.java.inside.basic']) { - sh 'MAVEN_OPTS="-Duser.name=' + "${p['jenkins.user.name']}" + ' -Duser.home=/tmp/jenkins-home" ' + - "./mvnw -Pwith-bom-client verify -B -U" - } - } + "./mvnw -s settings.xml -Pwith-bom-client verify -B -U" } } } @@ -96,13 +67,13 @@ pipeline { script { docker.image(p['docker.java.main.image']).inside(p['docker.java.inside.basic']) { sh 'MAVEN_OPTS="-Duser.name=' + "${p['jenkins.user.name']}" + ' -Duser.home=/tmp/jenkins-home" ' + - "./mvnw -Pci,artifactory " + + "./mvnw -s settings.xml -Pci,artifactory " + "-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-bom " + - "-Dartifactory.build-number=${BUILD_NUMBER} " + + "-Dartifactory.build-number=spring-data-bom-${BRANCH_NAME}-build-${BUILD_NUMBER} " + "-Dmaven.test.skip=true clean deploy -U -B" } } diff --git a/settings.xml b/settings.xml new file mode 100644 index 0000000..b3227cc --- /dev/null +++ b/settings.xml @@ -0,0 +1,29 @@ + + + + + spring-plugins-release + ${env.ARTIFACTORY_USR} + ${env.ARTIFACTORY_PSW} + + + spring-libs-snapshot + ${env.ARTIFACTORY_USR} + ${env.ARTIFACTORY_PSW} + + + spring-libs-milestone + ${env.ARTIFACTORY_USR} + ${env.ARTIFACTORY_PSW} + + + spring-libs-release + ${env.ARTIFACTORY_USR} + ${env.ARTIFACTORY_PSW} + + + + \ No newline at end of file