Also react on lava jobs that were canceled in jenkins 35/21835/1
authorJan-Simon Möller <jsmoeller@linuxfoundation.org>
Mon, 8 Jul 2019 17:00:50 +0000 (19:00 +0200)
committerJan-Simon Möller <jsmoeller@linuxfoundation.org>
Mon, 8 Jul 2019 17:00:50 +0000 (19:00 +0200)
This is needed to avoid jenkins polling until the timeout when a job
was aborted.

Change-Id: Ibcf0fffaeaac86a1198e4f0411e784ff74ab9f5b
Signed-off-by: Jan-Simon Möller <jsmoeller@linuxfoundation.org>
jjb/common/include-agl-lava-jobs-submit.sh

index 5ddb14f..4617275 100644 (file)
@@ -63,6 +63,11 @@ for i in $(seq 1 $JOB_TIMEOUT); do
                continue
     fi
     state=$(grep ^state: $JOB_STATUS| cut -d' ' -f2)
+    if [ $state == "Canceled" ]; then
+               status=$(grep ^health: $JOB_STATUS| cut -d' ' -f2)
+               echo "LAVA job $job_id completed with status: $status"
+               break
+    fi
     if [ $state == "Finished" ]; then
                status=$(grep ^health: $JOB_STATUS| cut -d' ' -f2)
                echo "LAVA job $job_id completed with status: $status"