Uploading large files on nexus prints lots of unwanted
messages in the logs, therefore disable this by passing
predefiend options through $MAVEN_OPTIONS. Also pass any
parameters to maven provided through job parameters.
Change-Id: I2e11adcb26d07097fa43cc289175aaa1cda897f9
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
UPLOAD_FILES_PATH={files-dir}
- shell: !include-raw-escape:
- ../shell/lftools-install.sh
+ - ../shell/common-variables.sh
- ../shell/deploy-maven-file.sh
- lf-provide-maven-settings-cleanup
# $GROUP_ID : Provided by a job parameter.
# $UPLOAD_FILES_PATH : Provided by a job parameter.
echo "---> deploy-maven-file.sh"
+
+# DO NOT enable -u because $MAVEN_PARAMS and $MAVEN_OPTIONS could be unbound.
# Ensure we fail the job if any steps fail.
-set -eu -o pipefail
+set -e -o pipefail
+set +u
+
+export MAVEN_OPTIONS
+export MAVEN_PARAMS
DEPLOY_LOG="$WORKSPACE/archives/deploy-maven-file.log"
mkdir -p "$WORKSPACE/archives"
"$REPO_ID" \
"$file" \
-b "$MVN" \
- -g "$GROUP_ID" | tee "$DEPLOY_LOG"
+ -g "$GROUP_ID" \
+ -p "$MAVEN_PARAMS $MAVEN_OPTIONS" \
+ |& tee "$DEPLOY_LOG"
done < <(find "$UPLOAD_FILES_PATH" -type f -name "*")