diff options
author | Corentin LABBE <clabbe@baylibre.com> | 2019-09-11 20:18:12 +0200 |
---|---|---|
committer | Corentin LABBE <clabbe@baylibre.com> | 2019-09-12 06:46:45 +0200 |
commit | 1d40bd026df93f4b2b41fef78934e5be64c4093b (patch) | |
tree | 9b9406f13e29277d3a4e5640103c0bb9c0b667ff | |
parent | 1d779c8531f5e6ba562d76a2347dde464334c2d0 (diff) |
Dont fail the CI when build-info is unavaillable
This patchs made the download of build-info non-fatal.
The build-info is used before running releng-scripts and for email
report.
Bug-AGL: SPEC-2177
Change-Id: I8ffaacafce472faa32dc06ecac486be037938f67
Signed-off-by: Corentin LABBE <clabbe@baylibre.com>
-rw-r--r-- | jjb/common/include-agl-run-test-short-guppy.sh | 2 | ||||
-rw-r--r-- | jjb/common/include-agl-run-test-short-halibut.sh | 2 | ||||
-rw-r--r-- | jjb/common/include-agl-run-test-short.sh | 2 | ||||
-rw-r--r-- | jjb/common/include-agl-send-email-report.sh | 11 |
4 files changed, 11 insertions, 6 deletions
diff --git a/jjb/common/include-agl-run-test-short-guppy.sh b/jjb/common/include-agl-run-test-short-guppy.sh index c6385219..35f4fe45 100644 --- a/jjb/common/include-agl-run-test-short-guppy.sh +++ b/jjb/common/include-agl-run-test-short-guppy.sh @@ -12,7 +12,7 @@ UPLOAD_URL=${UPLOAD_URL_BASE}/${RELEASE_BRANCH}/${RELEASE_VERSION}/${MACHINE}/de cd $REPODIR -wget -q ${UPLOAD_URL}/build-info +wget -q ${UPLOAD_URL}/build-info || echo "ERROR: fail to download ${UPLOAD_URL}/build-info" if [ -e build-info ]; then cat build-info source build-info diff --git a/jjb/common/include-agl-run-test-short-halibut.sh b/jjb/common/include-agl-run-test-short-halibut.sh index c6385219..35f4fe45 100644 --- a/jjb/common/include-agl-run-test-short-halibut.sh +++ b/jjb/common/include-agl-run-test-short-halibut.sh @@ -12,7 +12,7 @@ UPLOAD_URL=${UPLOAD_URL_BASE}/${RELEASE_BRANCH}/${RELEASE_VERSION}/${MACHINE}/de cd $REPODIR -wget -q ${UPLOAD_URL}/build-info +wget -q ${UPLOAD_URL}/build-info || echo "ERROR: fail to download ${UPLOAD_URL}/build-info" if [ -e build-info ]; then cat build-info source build-info diff --git a/jjb/common/include-agl-run-test-short.sh b/jjb/common/include-agl-run-test-short.sh index 6dc1c79f..f97218e8 100644 --- a/jjb/common/include-agl-run-test-short.sh +++ b/jjb/common/include-agl-run-test-short.sh @@ -12,7 +12,7 @@ UPLOAD_URL=${UPLOAD_URL_BASE}/${GERRIT_CHANGE_NUMBER}/${GERRIT_PATCHSET_NUMBER}/ cd $REPODIR -wget -q ${UPLOAD_URL}/build-info +wget -q ${UPLOAD_URL}/build-info || echo "ERROR: fail to download ${UPLOAD_URL}/build-info" if [ -e build-info ]; then cat build-info source build-info diff --git a/jjb/common/include-agl-send-email-report.sh b/jjb/common/include-agl-send-email-report.sh index 01daea34..84e3df80 100644 --- a/jjb/common/include-agl-send-email-report.sh +++ b/jjb/common/include-agl-send-email-report.sh @@ -12,10 +12,12 @@ UPLOAD_URL=${UPLOAD_URL_BASE}/${GERRIT_CHANGE_NUMBER}/${GERRIT_PATCHSET_NUMBER}/ set | grep MACH -wget -q ${UPLOAD_URL}/build-info || exit 0 +send_email_report() +{ +wget -q ${UPLOAD_URL}/build-info || echo "ERROR: send_email_report: failed to get build-info" if [ ! -s build-info ]; then - exit 0 + return 0 fi cat build-info source build-info @@ -30,6 +32,9 @@ if [ -n "$KCI_EMAIL_AUTH_TOKEN" ]; then GIT_DESCRIBE=$DIST_BB_DISTRO_VERSION-${DIST_LAYERS_MD5:0:8} fi 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 + 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 "ERROR: send_email_report: curl" echo "The test email reportS will be sent with a delay of 1 hour " fi +} + +send_email_report |