diff options
author | Jan-Simon Moeller <jsmoeller@linuxfoundation.org> | 2019-05-03 11:03:42 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@automotivelinux.org> | 2019-05-03 11:03:42 +0000 |
commit | ab1a175f9fef51c003b7f21de3e5cd55b23aac76 (patch) | |
tree | d303bf0fa4578a643f64a1e261d3416bf8a65bca | |
parent | edd0246fa62ce2d1fcbe66eef70a38ad67a0a480 (diff) | |
parent | 48e9992270f430a1104d1d210dc3a21727aa01cc (diff) |
Merge "Avoid failing the job when sending the email report"
-rw-r--r-- | jjb/common/include-agl-lava-jobs-submit.sh | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/jjb/common/include-agl-lava-jobs-submit.sh b/jjb/common/include-agl-lava-jobs-submit.sh index bf4f478d..93f8b703 100644 --- a/jjb/common/include-agl-lava-jobs-submit.sh +++ b/jjb/common/include-agl-lava-jobs-submit.sh @@ -95,10 +95,11 @@ if [ -z "$KCI_EMAIL_AUTH_TOKEN" ]; then TREE_NAME=$(grep kernel.tree: $JOB_FILE_NEW | sed 's,[[:space:]],,g' | cut -d: -f2) BRANCH=$(grep git.branch: $JOB_FILE_NEW | sed 's,[[:space:]],,g' | cut -d: -f2) GIT_DESCRIBE="$(grep kernel.version: $JOB_FILE_NEW | sed 's,[[:space:]],,g' | cut -d: -f2)" + set +e lavacli -i $lab results $job_id > test_plan.raw if [ $? -eq 0 ]; then grep '* [0-9]' test_plan.raw |cut -d_ -f2- |cut -d. -f1 | sort | uniq > test_plans - if [ $? -eq 0 ] && [ -s test_plans ]; then + 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 echo "The test email reportS will be sent with a delay of 1 hour " @@ -107,6 +108,7 @@ if [ -z "$KCI_EMAIL_AUTH_TOKEN" ]; then echo "There is no test plan identified" fi fi + set -e fi # after one successful submit, we're done if [ x"$status" = x"Complete" ]; then |