From e0de0eeb4cb60dede6c87c746888640b5b27ea0d Mon Sep 17 00:00:00 2001 From: Thanh Ha Date: Mon, 25 Jan 2016 21:06:12 -0500 Subject: [PATCH] Add logic to skip closing the Nexus staging repo In order to sign artifacts we need to skip closing the staging repo after it is produced. This allows the gpg key signatures to be uploaded into the staging repo. This patch uses the existing DATESTAMP variable to determine if the staging repo should be created open or closed. If a DATESTAMP is true then close the staging repo, otherwise it is likely a release candidate so skip closing the staging repo. Change-Id: I2330c467824c0b50d70923aedbe20e56ac9cb0e9 Signed-off-by: Thanh Ha --- .../include-raw-autorelease-maven-deploy.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/jjb/autorelease/include-raw-autorelease-maven-deploy.sh b/jjb/autorelease/include-raw-autorelease-maven-deploy.sh index 402b90a4e..d41d2693a 100644 --- a/jjb/autorelease/include-raw-autorelease-maven-deploy.sh +++ b/jjb/autorelease/include-raw-autorelease-maven-deploy.sh @@ -9,6 +9,15 @@ # http://www.eclipse.org/legal/epl-v10.html ############################################################################## +# Job will pass in a variable ${DATESTAMP} if this variable is false than we +# we are likely releasing a release candidate. We should skip closing the +# Nexus staging repository so that we can sign the artifacts. +SKIP_STAGING_CLOSE=false +if [ "${DATESTAMP}" == "false" ] +then + SKIP_STAGING_CLOSE=true +fi + mkdir -p hide/from/pom/files cd hide/from/pom/files mkdir -p m2repo/org/opendaylight/ @@ -32,6 +41,7 @@ rsync -avz --exclude 'maven-metadata-local.xml' \ "/tmp/r/org/opendaylight/integration" m2repo/org/opendaylight/ mvn org.sonatype.plugins:nexus-staging-maven-plugin:1.6.2:deploy-staged-repository \ + -DskipStagingRepositoryClose=${SKIP_STAGING_CLOSE} -DrepositoryDirectory="`pwd`/m2repo" \ -DnexusUrl=http://nexus.opendaylight.org/ \ -DstagingProfileId="425e43800fea70" \ -- 2.36.6