From 4c68c03b499a0bf75ee07352fa3f7bbf4525707e Mon Sep 17 00:00:00 2001 From: Khouloud Touil Date: Fri, 14 Jun 2019 15:21:54 +0200 Subject: 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 Change-Id: Ida258e410d8e0321d97cf30d379f7696443373da --- jjb/common/include-agl-send-email-report.sh | 32 +++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 jjb/common/include-agl-send-email-report.sh (limited to 'jjb/common/include-agl-send-email-report.sh') 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 +# 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 -- cgit 1.2.3-korg