--- /dev/null
+---
+fixes:
+ - |
+ Handle multiple search extension or patterns passed by upstream JJB
+ ARCHIVE_ARTIFACTS param as a single string by spliting these values
+ before being passed to ``lftools deploy archives``.
+
+ .. code-block:: bash
+
+ ARCHIVE_ARTIFACTS="**/*.prop \
+ **/*.log \
+ **/target/surefire-reports/*-output.txt \
+ **/target/failsafe-reports/failsafe-summary.xml \
+ **/hs_err_*.log **/target/feature/feature.xml"
+
+ For example, the above env variable passed to the script and to
+ ``lftools deploy archives`` as:
+
+ .. code-block:: bash
+
+ lftools deploy archives -p **/*.prop \
+ **/*.log \
+ **/target/surefire-reports/*-output.txt \
+ **/target/failsafe-reports/failsafe-summary.xml \
+ **/hs_err_*.log **/target/feature/feature.xml \
+ "$NEXUS_URL" \
+ "$NEXUS_PATH" \
+ "$WORKSPACE"
+
+ The correct way of passing this as per lftools implmentation is:
+
+ .. code-block:: bash
+
+ lftools deploy archives -p '**/*.prop' \
+ -p '**/*.log' \
+ -p '**/target/surefire-reports/*-output.txt' \
+ -p '**/target/failsafe-reports/failsafe-summary.xml' \
+ -p '**/hs_err_*.log' \
+ -p '**/target/feature/feature.xml' \
+ "$NEXUS_URL" \
+ "$NEXUS_PATH" \
+ "$WORKSPACE"
nexus_url="${NEXUSPROXY:-$NEXUS_URL}"
nexus_path="${SILO}/${JENKINS_HOSTNAME}/${JOB_NAME}/${BUILD_NUMBER}"
- lftools deploy archives -p "${ARCHIVE_ARTIFACTS:-}" "$nexus_url" \
- "$nexus_path" "$WORKSPACE"
+ # Handle multiple search extensions as separate values to '-p|--pattern'
+ set -f # Disable pathname expansion
+ IFS=' ' read -r -a search_exts <<< "${ARCHIVE_ARTIFACTS:-}"
+ pattern_opts=()
+ for search_ext in "${search_exts[@]}";
+ do
+ pattern_opts+=("-p" "$search_ext")
+ done
+
+ lftools deploy archives "${pattern_opts[@]}" "$nexus_url" "$nexus_path" \
+ "$WORKSPACE"
+ set +f # Enable pathname expansion
lftools deploy logs "$nexus_url" "$nexus_path" "${BUILD_URL:-}"
echo "Build logs: <a href=\"$LOGS_SERVER/$nexus_path\">$LOGS_SERVER/$nexus_path</a>"