From a11340b85e39234cdce9b4e6ae5f04136be68807 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Tue, 21 Sep 2021 11:27:32 +0200 Subject: [PATCH] Polishing. See #2423 --- Jenkinsfile | 37 ++++++------------------------------- 1 file changed, 6 insertions(+), 31 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index ef71a5ea0..991563051 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -14,8 +14,9 @@ pipeline { stages { stage("test: baseline (jdk8)") { when { + beforeAgent(true) anyOf { - branch '' + branch(pattern: "main|(\\d\\.\\d\\.x)", comparator: "REGEXP") not { triggeredBy 'UpstreamCause' } } } @@ -39,8 +40,9 @@ pipeline { stage("Test other configurations") { when { + beforeAgent(true) allOf { - branch '' + branch(pattern: "main|(\\d\\.\\d\\.x)", comparator: "REGEXP") not { triggeredBy 'UpstreamCause' } } } @@ -87,8 +89,9 @@ pipeline { stage('Release to artifactory') { when { + beforeAgent(true) anyOf { - branch '' + branch(pattern: "main|(\\d\\.\\d\\.x)", comparator: "REGEXP") not { triggeredBy 'UpstreamCause' } } } @@ -118,34 +121,6 @@ pipeline { } } } - stage('Publish documentation') { - when { - branch '' - } - agent { - label 'data' - } - options { timeout(time: 20, unit: 'MINUTES') } - - environment { - ARTIFACTORY = credentials('02bd1690-b54f-4c9f-819d-a77cb7a9822c') - } - - steps { - script { - docker.withRegistry('', 'hub.docker.com-springbuildmaster') { - docker.image('adoptopenjdk/openjdk8:latest').inside('-v $HOME:/tmp/jenkins-home') { - sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -s settings.xml -Pci,distribute ' + - '-Dartifactory.server=https://repo.spring.io ' + - "-Dartifactory.username=${ARTIFACTORY_USR} " + - "-Dartifactory.password=${ARTIFACTORY_PSW} " + - "-Dartifactory.distribution-repository=temp-private-local " + - '-Dmaven.test.skip=true clean deploy -U -B' - } - } - } - } - } } post {