Enable batch mode and disable transfer logs 81/54081/2
authorThanh Ha <thanh.ha@linuxfoundation.org>
Thu, 30 Mar 2017 00:43:02 +0000 (20:43 -0400)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Thu, 30 Mar 2017 02:41:18 +0000 (22:41 -0400)
Also ensure script fails when anything fails in the script.

Change-Id: Icbc0a80a6f6e6955925eedf20895f2b799ebc147
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
scripts/odlsign-bulk

index 6a9acf8d0dfc4dc698f0c2ff1fe3d8b4653f4160..36443f38942506d1cc371a3019bfb9499cfd6904 100755 (executable)
@@ -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 <staging-repo>"
     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" \