X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=shell%2Fdeploy-maven-file.sh;h=37cfd9f4f51eebe27c185b1dd4085691406450ff;hb=refs%2Fchanges%2F94%2F5594%2F6;hp=8b6fad8eb2ab19bc1005188e4716792e6658f174;hpb=799b9c72a23db2d8a60e80988096db7224815e16;p=releng%2Fglobal-jjb.git diff --git a/shell/deploy-maven-file.sh b/shell/deploy-maven-file.sh index 8b6fad8e..37cfd9f4 100644 --- a/shell/deploy-maven-file.sh +++ b/shell/deploy-maven-file.sh @@ -1,5 +1,5 @@ #!/bin/bash -# @License EPL-1.0 +# SPDX-License-Identifier: EPL-1.0 ############################################################################## # Copyright (c) 2017 The Linux Foundation and others. # @@ -17,8 +17,14 @@ # $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" @@ -31,5 +37,7 @@ do "$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 "*")