From 6ff1f0578be8624e5a5fa8860deb455c4f89fa76 Mon Sep 17 00:00:00 2001 From: Greg Turnquist Date: Fri, 19 Jul 2019 11:41:22 -0500 Subject: [PATCH] DATAREDIS-1380 - Publish documentation for main branch. --- Jenkinsfile | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 60b913da1..7c94e39c9 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -77,8 +77,10 @@ pipeline { stage('Release to artifactory') { when { - branch 'issue/*' - not { triggeredBy 'UpstreamCause' } + anyOf { + branch 'master' + not { triggeredBy 'UpstreamCause' } + } } agent { docker { @@ -106,7 +108,7 @@ pipeline { } } - stage('Release to artifactory with docs') { + stage('Publish documentation') { when { branch 'master' } @@ -124,14 +126,11 @@ pipeline { } steps { - sh 'rm -rf ?' - sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -Pci,artifactory ' + + sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -Pci,distribute ' + '-Dartifactory.server=https://repo.spring.io ' + "-Dartifactory.username=${ARTIFACTORY_USR} " + "-Dartifactory.password=${ARTIFACTORY_PSW} " + - "-Dartifactory.staging-repository=libs-snapshot-local " + - "-Dartifactory.build-name=spring-data-redis " + - "-Dartifactory.build-number=${BUILD_NUMBER} " + + "-Dartifactory.distribution-repository=temp-private-local " + '-Dmaven.test.skip=true clean deploy -B' } }