Do Not Invoke emailNotification without LAVA Jobs
Invoking emailNotification when there is no LAVA job submitted
would cause an error, because output is a null value.
This function should only be invoked
when there are LAVA jobs submitted.
Change-Id: Ic79673355eef8796ad62dcf517fe3b4003aa550a
Signed-off-by: Xinyu Zhang <xinyu.zhang@arm.com>
diff --git a/jenkins/ci.jpl b/jenkins/ci.jpl
index acb2d96..bb5f73f 100644
--- a/jenkins/ci.jpl
+++ b/jenkins/ci.jpl
@@ -507,7 +507,9 @@
success = false
} finally {
archiveArtifacts artifacts: 'tf-m-ci-scripts/lava_artifacts/**', allowEmptyArchive: true
- emailNotification(success, 'test', filterFailedTest(output))
+ if (all_jobs.size() > 0) {
+ emailNotification(success, 'test', filterFailedTest(output))
+ }
cleanWs()
if (!success) {
error("There was an Error waiting for LAVA jobs")