From fba02280934cae9e97d2bb0de326a5529a1b963a Mon Sep 17 00:00:00 2001 From: Greg Turnquist Date: Wed, 3 Jul 2019 11:27:45 -0500 Subject: [PATCH] DATACOUCH-456 - Use parent 'artifactory' profile. --- Jenkinsfile | 25 ++++++++++++++++++++----- pom.xml | 41 ----------------------------------------- 2 files changed, 20 insertions(+), 46 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index e26156aa..025e21b6 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -8,6 +8,7 @@ pipeline { options { disableConcurrentBuilds() + buildDiscarder(logRotator(numToKeepStr: '14')) } stages { @@ -29,7 +30,7 @@ pipeline { options { timeout(time: 30, unit: 'MINUTES') } steps { sh 'rm -rf ?' - sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/spring-data-maven-repository" ./mvnw -Pci clean dependency:list test -Dsort -Dbundlor.enabled=false -B' + sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -Pci clean dependency:list test -Dsort -Dbundlor.enabled=false -B' sh "chown -R 1001:1001 target" } } @@ -44,7 +45,7 @@ pipeline { agent { docker { image 'adoptopenjdk/openjdk8:latest' - args '-v $HOME/.m2:/tmp/spring-data-maven-repository' + args '-v $HOME:/tmp/jenkins-home' } } options { timeout(time: 20, unit: 'MINUTES') } @@ -55,7 +56,14 @@ pipeline { steps { sh 'rm -rf ?' - sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/spring-data-maven-repository" ./mvnw -Pci,snapshot deploy -Dmaven.test.skip=true -B' + sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -Pci,artifactory ' + + '-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-couchbase " + + "-Dartifactory.build-number=${BUILD_NUMBER} " + + '-Dmaven.test.skip=true clean deploy -B' } } @@ -66,7 +74,7 @@ pipeline { agent { docker { image 'adoptopenjdk/openjdk8:latest' - args '-v $HOME/.m2:/tmp/spring-data-maven-repository' + args '-v $HOME:/tmp/jenkins-home' } } options { timeout(time: 20, unit: 'MINUTES') } @@ -77,7 +85,14 @@ pipeline { steps { sh 'rm -rf ?' - sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/spring-data-maven-repository" ./mvnw -Pci,snapshot deploy -Dmaven.test.skip=true -B' + sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -Pci,artifactory ' + + '-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-couchbase " + + "-Dartifactory.build-number=${BUILD_NUMBER} " + + '-Dmaven.test.skip=true clean deploy -B' } } } diff --git a/pom.xml b/pom.xml index 45e655fe..89e98c8d 100644 --- a/pom.xml +++ b/pom.xml @@ -153,47 +153,6 @@ - - snapshot - - - - - org.jfrog.buildinfo - artifactory-maven-plugin - 2.6.1 - false - - - build-info - - publish - - - - {{BUILD_URL}} - - - spring-data-couchbase - spring-data-couchbase - false - *:*:*:*@zip - - - https://repo.spring.io - {{ARTIFACTORY_USR}} - {{ARTIFACTORY_PSW}} - libs-snapshot-local - libs-snapshot-local - - - - - - - - - release