Merge "Pass common maven options to deploy file builder"
authorThanh Ha <thanh.ha@linuxfoundation.org>
Fri, 28 Jul 2017 01:00:31 +0000 (01:00 +0000)
committerGerrit Code Review <gerrit@linuxfoundation.org>
Fri, 28 Jul 2017 01:00:31 +0000 (01:00 +0000)
jjb/lf-macros.yaml
shell/deploy-maven-file.sh

index 310e0fe..7d3e121 100644 (file)
               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
 
index 0ae0f04..37cfd9f 100644 (file)
 # $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 "*")