From 832dc2bdf5c7012d8be8758b57ceb458ec8c9855 Mon Sep 17 00:00:00 2001 From: Thanh Ha Date: Fri, 1 Dec 2017 10:12:14 -0500 Subject: [PATCH] Revert "Use eval command to append mail options" The original commit introduces a regression in our ability to send emails to the correct mailing lists. This reverts commit ea26afb7d635a615547490e05a7aef2d9bcda265. Issue: RELENG-70 Change-Id: If493d40462d12edba2913971ba145a3d2b4a75e9 Signed-off-by: Thanh Ha --- jjb/autorelease/notify-build-failure.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/jjb/autorelease/notify-build-failure.sh b/jjb/autorelease/notify-build-failure.sh index e17ce7f84..090e80803 100644 --- a/jjb/autorelease/notify-build-failure.sh +++ b/jjb/autorelease/notify-build-failure.sh @@ -125,24 +125,24 @@ if ([ ! -z "${NAME}" ] || [ ! -z "${ARTIFACT_ID}" ]) && [[ "${BUILD_STATUS}" != $CONSOLE_LOG | gzip > "$ERROR_LOG" if [ -n "${PROJECT}" ]; then - RELEASE_EMAIL="\${RELEASE_EMAIL}, \${PROJECT}-dev@lists.opendaylight.org" + RELEASE_EMAIL="${RELEASE_EMAIL}, ${PROJECT}-dev@lists.opendaylight.org" fi file_size=$(du -k "$ERROR_LOG" | cut -f1) - PARAMS=("-r \"Jenkins \"") - PARAMS+=("-s \"$SUBJECT\"") # Only send emails in production (releng), not testing (sandbox) if [ "${SILO}" == "releng" ]; then if [[ "$file_size" -gt 100 ]]; then # shellcheck disable=SC2034 ATTACHMENT=ATTACHMENT_EXCLUDE + eval echo \""${BODY}"\" | mail \ + -r "Jenkins " \ + -s "${SUBJECT}" "${RELEASE_EMAIL}" else - PARAMS+=("-a \"$ERROR_LOG\"") + eval echo \""${BODY}"\" | mail -a "$ERROR_LOG" \ + -r "Jenkins " \ + -s "${SUBJECT}" "${RELEASE_EMAIL}" fi - - eval echo \""${BODY}"\" | eval mail "${PARAMS[*]}" "${RELEASE_EMAIL}" - elif [ "${SILO}" == "sandbox" ]; then echo "Running in sandbox, not actually sending notification emails" echo "Subject: ${SUBJECT}" -- 2.36.6