From: Thanh Ha Date: Thu, 30 Mar 2017 00:43:02 +0000 (-0400) Subject: Enable batch mode and disable transfer logs X-Git-Tag: release/carbon~199^2 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=4a1417fae961467eecc0ce2fd9765ee9c8f7715a;p=releng%2Fbuilder.git Enable batch mode and disable transfer logs Also ensure script fails when anything fails in the script. Change-Id: Icbc0a80a6f6e6955925eedf20895f2b799ebc147 Signed-off-by: Thanh Ha --- diff --git a/scripts/odlsign-bulk b/scripts/odlsign-bulk index 6a9acf8d0..36443f389 100755 --- a/scripts/odlsign-bulk +++ b/scripts/odlsign-bulk @@ -10,6 +10,9 @@ # http://www.eclipse.org/legal/epl-v10.html ############################################################################## +# Force any errors to cause the script to end with failure +set -eu -o pipefail + function print_usage { echo "Usage: $0 " echo "" @@ -39,7 +42,8 @@ if [ -d "$SIGNATURES_DIR" ]; then fi mkdir $SIGNATURES_DIR -mvn org.sonatype.plugins:nexus-staging-maven-plugin:1.6.7:deploy-staged-repository \ +mvn org.sonatype.plugins:nexus-staging-maven-plugin:1.6.8:deploy-staged-repository \ + -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \ -DskipStagingRepositoryClose=true \ -DrepositoryDirectory="$SIGNATURES_DIR" \ -DnexusUrl=https://nexus.opendaylight.org/ \ @@ -47,7 +51,7 @@ mvn org.sonatype.plugins:nexus-staging-maven-plugin:1.6.7:deploy-staged-reposito -DserverId="opendaylight.staging" | tee /tmp/deploy-staged-repository.log STAGED_REPO_ID=`grep 'Created staging repository with ID' /tmp/deploy-staged-repository.log | sed -e 's/.*ID "//' -e 's/".*//'` -echo "Staged Repo: $STAGED_REPO" +echo "Staged Repo: $STAGED_REPO_ID" # # Finally retrieve and sign artifacts. @@ -57,7 +61,8 @@ for i in $PROJECTS do echo "Signing $i" ./odlrelease sign http://nexus.opendaylight.org/content/repositories/$SIGNREPO/org/opendaylight/$i/ - mvn org.sonatype.plugins:nexus-staging-maven-plugin:1.6.7:deploy-staged-repository \ + mvn org.sonatype.plugins:nexus-staging-maven-plugin:1.6.8:deploy-staged-repository \ + -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \ -DskipStagingRepositoryClose=true \ -DstagingRepositoryId=$STAGED_REPO_ID \ -DrepositoryDirectory="$SIGNATURES_DIR" \