From: Thanh Ha Date: Thu, 18 Jan 2018 19:20:46 +0000 (-0500) Subject: Improve verbosity in maven shell scripts X-Git-Tag: v0.15.0~2^2 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F30%2F8430%2F1;p=releng%2Fglobal-jjb.git Improve verbosity in maven shell scripts There is no harm in enabling debug level verbosity for these scripts and may help in improving troubleshooting. Change-Id: I9edfee2f7d2415117d854ad7cdba280cc9751004 Signed-off-by: Thanh Ha --- diff --git a/shell/maven-build.sh b/shell/maven-build.sh index 6be1900c..a807a03a 100644 --- a/shell/maven-build.sh +++ b/shell/maven-build.sh @@ -14,7 +14,7 @@ # DO NOT enable -u because $MAVEN_PARAMS and $MAVEN_OPTIONS could be unbound. # Ensure we fail the job if any steps fail. -set -e -o pipefail +set -xe -o pipefail set +u export MAVEN_OPTS diff --git a/shell/maven-fetch-metadata.sh b/shell/maven-fetch-metadata.sh index d3670d06..ebffa96f 100644 --- a/shell/maven-fetch-metadata.sh +++ b/shell/maven-fetch-metadata.sh @@ -12,7 +12,7 @@ # Uses wget to fetch a project's maven-metadata.xml files from a Maven repository. # Ensure we fail the job if any steps fail. -set -eu -o pipefail +set -xeu -o pipefail project=$(xmlstarlet sel \ -N "x=http://maven.apache.org/POM/4.0.0" -t \ diff --git a/shell/maven-javadoc-generate.sh b/shell/maven-javadoc-generate.sh index 405b29b0..891f60bc 100644 --- a/shell/maven-javadoc-generate.sh +++ b/shell/maven-javadoc-generate.sh @@ -13,7 +13,7 @@ # DO NOT enable -u because $MAVEN_PARAMS and $MAVEN_OPTIONS could be unbound. # Ensure we fail the job if any steps fail. -set -e -o pipefail +set -xe -o pipefail set +u JAVADOC_DIR="$WORKSPACE/archives/javadoc" diff --git a/shell/maven-sonar.sh b/shell/maven-sonar.sh index ef9bea28..ae9648a8 100644 --- a/shell/maven-sonar.sh +++ b/shell/maven-sonar.sh @@ -14,7 +14,7 @@ # DO NOT enable -u because $MAVEN_PARAMS and $MAVEN_OPTIONS could be unbound. # Ensure we fail the job if any steps fail. -set -e -o pipefail +set -xe -o pipefail set +u export MAVEN_OPTS diff --git a/shell/maven-stage.sh b/shell/maven-stage.sh index 482b53f4..74b74a99 100644 --- a/shell/maven-stage.sh +++ b/shell/maven-stage.sh @@ -16,7 +16,7 @@ # $STAGING_PROFILE_ID : Provided by a job parameter. # Ensure we fail the job if any steps fail. -set -eu -o pipefail +set -xeu -o pipefail TMP_FILE="$(mktemp)" lftools deploy nexus-stage "$NEXUS_URL" "$STAGING_PROFILE_ID" "$WORKSPACE/m2repo" | tee "$TMP_FILE"