diff options
author | Khouloud Touil <ktouil@baylibre.com> | 2019-06-14 15:21:54 +0200 |
---|---|---|
committer | Khouloud Touil <ktouil@baylibre.com> | 2019-06-19 15:19:56 +0200 |
commit | 4c68c03b499a0bf75ee07352fa3f7bbf4525707e (patch) | |
tree | f71da1c8018a4b7928a03e5d942aa757e1ee4d8a /jjb | |
parent | bfd529bf651daf96e2ea84e781719a09c1ff9cad (diff) |
Add a new script include-agl-send-email-report.sh
This script sends an email report with all the agl-testplan.
Bug-AGL: SPEC-2177
Signed-off-by: Khouloud Touil <ktouil@baylibre.com>
Change-Id: Ida258e410d8e0321d97cf30d379f7696443373da
Diffstat (limited to 'jjb')
-rw-r--r-- | jjb/common/include-agl-send-email-report.sh | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/jjb/common/include-agl-send-email-report.sh b/jjb/common/include-agl-send-email-report.sh new file mode 100644 index 00000000..b8be71aa --- /dev/null +++ b/jjb/common/include-agl-send-email-report.sh @@ -0,0 +1,32 @@ +# (c) 2019 Khouloud Touil <ktouil@baylibre.com> +# License GPLv2 +# +################################################################################ +## Send email reports after the job is done. +################################################################################ + +set -x + +UPLOAD_URL_BASE=http://download.automotivelinux.org/AGL/upload/ci +UPLOAD_URL=${UPLOAD_URL_BASE}/${GERRIT_CHANGE_NUMBER}/${GERRIT_PATCHSET_NUMBER}/qemux86-64/deploy/images/qemux86-64 + +wget -q ${UPLOAD_URL}/build-info +if [ $? != 0 ]; then + exit 0 +fi + +if [ ! -s build-info ]; then + exit 0 +fi + cat build-info + source build-info + +if [ -n "$KCI_EMAIL_AUTH_TOKEN" ]; then + KCI_API='http://kernelci.dev.baylibre.com:8081' + TREE_NAME='AGL-yocto' + BRANCH=$DIST_BB_AGL_BRANCH + GIT_DESCRIBE=$DIST_BB_DISTRO_VERSION + PLAN='agl-testplan' + 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 " +fi
\ No newline at end of file |