Merge "feat(gate) adding retry mechanism to jarvis-projects verification"
This commit is contained in:
commit
890b6a7c3f
@ -69,9 +69,18 @@ EOF
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
# Ensure that the patch set has been labelled `Verified` by the Jarvis System
|
# Check that Jarvis-System has reported the success of the pipeline run to Gerrit
|
||||||
VERIFIED="$(curl -L https://gerrit.jarvis.local/changes/${change_id}/revisions/1/review/ | tail -1 | jq -r .labels.Verified.all[0].value)"
|
end=$(date +%s)
|
||||||
if [ "$VERIFIED" -ne 1 ]; then
|
timeout="30"
|
||||||
exit 1
|
end=$((end + timeout))
|
||||||
fi
|
while true; do
|
||||||
|
VERIFIED="$(curl -L https://gerrit.jarvis.local/changes/${change_id}/revisions/1/review/ | tail -1 | jq -r .labels.Verified.all[0].value)"
|
||||||
|
[ "$VERIFIED" == 1 ] && break || true
|
||||||
|
sleep 5
|
||||||
|
now=$(date +%s)
|
||||||
|
if [ "$now" -gt "$end" ] ; then
|
||||||
|
echo "Jarvis-System has not verified the change"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
done
|
||||||
done
|
done
|
Loading…
x
Reference in New Issue
Block a user