tf-a-builder/squad.sh: loop until job's state is finished
Although the (blocking) call 'lavacli jobs wait ${LAVAJOB_ID}' is
useful to fetch the LAVA job, in case of a network 'glitch' [1] during the
wait, the call breaks returning a 502 response:
13:37:56 + timeout 5400 lavacli jobs wait 142534
13:37:56 Submitted....Unable to call 'jobs.wait': 502 Server Error: \
Proxy Error for url: https://****:****@tf.validation.linaro.org/RPC2
13:38:22 + echo 'Stopped monitoring LAVA JOB 142534 after 5400
seconds, likely stuck or timeout too short?'
This patch proposes another approach with the same goal: loop every
minute, calling 'lavacli jobs show', the latter quickly returning job's
status including its state: submitted, running or finished. Once the
status is finished, loop quits. If job execution takes more than 1.5
hours and jobs has not finished, then loop breaks giving a timeout,
which is the same timeout value as before.
[1] https://ci.trustedfirmware.org/job/tf-ci-gateway/4660/
Signed-off-by: Leonardo Sandoval <leonardo.sandoval@linaro.org>
Change-Id: If781def0457b42c35049fd44c06576f0430ff9de
1 file changed