Better long validation task management

When a validation test is running more than 40 seconds, we don't need to exit
the script and simply fail (which is causing some promotion trouble). Instead,
we skip the mistral execution and pass to the other validation test.

Change-Id: I07a61f9e4a013a08e6fbbc152c5afdb06d7ba636
Signed-off-by: Gael Chamoulaud <gchamoul@redhat.com>
This commit is contained in:
Gael Chamoulaud 2017-08-02 19:01:17 +02:00 committed by Attila Darazs
parent 5d6334a7ee
commit c424cc70b9
1 changed files with 3 additions and 3 deletions

View File

@ -50,13 +50,13 @@ for validation_name in $LIST_VALIDATIONS; do
STATE=$(mistral execution-get -f value -c State "$ID")
TRIES=$((TRIES+1))
if [ "$TRIES" -gt 40 ]; then
exit 1
break
fi
done
STATUS=$(mistral execution-get-output "$ID" | jq .status -r)
if [ "$STATUS" == "FAILED" ]; then
echo "### ${validation_name} ###" | tee -a {{ failed_validations_log }}
if [ "$STATUS" != "SUCCESS" ]; then
echo "### ${validation_name} $STATUS ###" | tee -a {{ failed_validations_log }}
mistral execution-get-output "$ID" | jq .stdout -r 2>&1 | tee -a {{ failed_validations_log }}
else
mistral execution-get-output "$ID" | jq .stdout -r