aboutsummaryrefslogtreecommitdiff
path: root/jenkins/bisect.jpl
diff options
context:
space:
mode:
authorGuillaume Tucker <guillaume.tucker@collabora.com>2018-12-11 20:10:38 +0000
committerGuillaume Tucker <guillaume.tucker@collabora.com>2018-12-14 15:46:11 +0000
commit871a29e7b676109ec4afe75bc7ac73a1ff1329a4 (patch)
tree7fa7e313a0ee3f0307a51a64664b1ecd32980f1b /jenkins/bisect.jpl
parent93e941ea0211cc5cbdc9bdf7cf71cf2a99a33da9 (diff)
bisect.jpl: add retries for LAVA infrastructure errors
When a LAVA infrastructure error occurs, try up to 3 times to run the same job before returning the error. This helps with occasional infrastructure errors. Signed-off-by: Guillaume Tucker <guillaume.tucker@collabora.com>
Diffstat (limited to 'jenkins/bisect.jpl')
-rw-r--r--jenkins/bisect.jpl16
1 files changed, 13 insertions, 3 deletions
diff --git a/jenkins/bisect.jpl b/jenkins/bisect.jpl
index 3157c95..0606b13 100644
--- a/jenkins/bisect.jpl
+++ b/jenkins/bisect.jpl
@@ -314,9 +314,19 @@ def runTest(kci_core, describe, expected=0, runs=0) {
for (int i = 1; i <= runs; i++) {
echo "Run ${i} / ${runs}"
- def hook = registerWebhook()
- submitJob(kci_core, describe, hook)
- status = getResult(kci_core, hook)
+
+ def retries = 3
+
+ while (retries) {
+ def hook = registerWebhook()
+ submitJob(kci_core, describe, hook)
+ status = getResult(kci_core, hook)
+
+ if (status == 1)
+ retries -= 1
+ else
+ break
+ }
if (status != expected)
break