jjb/common: lava-jobs-submit: fix email recipients 59/21459/1
authorKevin Hilman <khilman@baylibre.com>
Thu, 30 May 2019 19:28:39 +0000 (12:28 -0700)
committerKevin Hilman <khilman@baylibre.com>
Thu, 30 May 2019 19:28:47 +0000 (12:28 -0700)
Remove the leading space from the email recipient when requesting an
email report.  The leading space was causing the SMTP handling on the
backend to reject the request.

Change-Id: Id176728a7c6eea8f54128d74cf658b13b6be81cb
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
jjb/common/include-agl-lava-jobs-submit.sh

index 55db062..03c4733 100644 (file)
@@ -102,7 +102,7 @@ if [ -n "$KCI_EMAIL_AUTH_TOKEN" ]; then
                grep '* [0-9]' test_plan.raw |cut -d_ -f2- |cut -d. -f1 | sort | uniq > test_plans
                if [ -s test_plans ]; then
                        for plan in $(<test_plans); do
-                               curl -X POST -H "Authorization: $KCI_EMAIL_AUTH_TOKEN" -H "Content-Type: application/json" -d '{"job": "'$TREE_NAME'", "kernel": "'$GIT_DESCRIBE'", "git_branch": "'$BRANCH'", "report_type": "test", "plan": "'$plan'", "send_to": [" automotive-testreports@lists.linuxfoundation.org"], "format": ["txt"], "delay": 3600}' ${KCI_API}/send
+                               curl -X POST -H "Authorization: $KCI_EMAIL_AUTH_TOKEN" -H "Content-Type: application/json" -d '{"job": "'$TREE_NAME'", "kernel": "'$GIT_DESCRIBE'", "git_branch": "'$BRANCH'", "report_type": "test", "plan": "'$plan'", "send_to": ["automotive-testreports@lists.linuxfoundation.org"], "format": ["txt"], "delay": 3600}' ${KCI_API}/send
                                echo "The test email reportS will be sent with a delay of 1 hour "
                        done
                else