From: Lott, Christopher (cl778h) Date: Mon, 13 Jan 2020 15:36:56 +0000 (-0500) Subject: Add info output in maven-javadoc-generate.sh X-Git-Tag: v0.50.0~24 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=cc136c050de6cd55ce799f3166f028e2bef4af3d;p=releng%2Fglobal-jjb.git Add info output in maven-javadoc-generate.sh Revise shell script maven-javadoc-generate.sh to drop unnecessary -l for login shell; restore shell -x behavior to maven command for debug details in log; add info output when creating tarball in verify path. Change-Id: Ifdd5693dee73ffd7a75a97f3a572f3a31aafd7c4 Signed-off-by: Lott, Christopher (cl778h) Issue-ID: RELENG-1872 --- diff --git a/releasenotes/notes/restore-javadoc-gen-x-8435879c369a9d9c.yaml b/releasenotes/notes/restore-javadoc-gen-x-8435879c369a9d9c.yaml new file mode 100644 index 00000000..85b03e52 --- /dev/null +++ b/releasenotes/notes/restore-javadoc-gen-x-8435879c369a9d9c.yaml @@ -0,0 +1,7 @@ +--- +fixes: + - | + Revise shell script maven-javadoc-generate.sh to + drop unnecessary -l for login shell; + restore shell -x behavior to maven command for debug details in log; + add info output when creating tarball in verify path. diff --git a/shell/maven-javadoc-generate.sh b/shell/maven-javadoc-generate.sh index 299559d8..137f4d7a 100644 --- a/shell/maven-javadoc-generate.sh +++ b/shell/maven-javadoc-generate.sh @@ -1,4 +1,4 @@ -#!/bin/bash -l +#!/bin/bash # SPDX-License-Identifier: EPL-1.0 ############################################################################## # Copyright (c) 2017 The Linux Foundation and others. @@ -23,7 +23,9 @@ export MAVEN_OPTS # Disable SC2086 because we want to allow word splitting for $MAVEN_* parameters. # shellcheck disable=SC2086 -$MVN clean install javadoc:aggregate \ +# Use -x via subshell to show maven invocation details in the log +(set -x + $MVN clean install javadoc:aggregate \ -e -Pq -Dmaven.javadoc.skip=false \ -DskipTests=true \ -Dcheckstyle.skip=true \ @@ -31,17 +33,20 @@ $MVN clean install javadoc:aggregate \ --global-settings "$GLOBAL_SETTINGS_FILE" \ --settings "$SETTINGS_FILE" \ -f "$MAVEN_DIR" \ - $MAVEN_OPTIONS $MAVEN_PARAMS + $MAVEN_OPTIONS $MAVEN_PARAMS \ +) mv "$WORKSPACE/$MAVEN_DIR/target/site/apidocs" "$JAVADOC_DIR" # TODO: Nexus unpack plugin throws a "504 gateway timeout" for jobs archiving -# large number of small files. Remove the workaround only we move away from +# large number of small files. Remove the workaround when we move away from # using Nexus as the log server. if [[ "$JOB_NAME" =~ "javadoc-verify" ]]; then # Tarball the javadoc dir and rm the directory to avoid re-upload into logs + tarball="$WORKSPACE/archives/javadoc.tar.xz" + echo "INFO: archiving $JAVADOC_DIR as $tarball" pushd "$JAVADOC_DIR" - tar cvJf "$WORKSPACE/archives/javadoc.tar.xz" . - rm -rf "$JAVADOC_DIR" + tar cvJf "$tarball" . popd + rm -rf "$JAVADOC_DIR" fi