summaryrefslogtreecommitdiff
path: root/scripts/prepare_build.sh
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2016-06-07 13:06:24 +0200
committerKamil Trzcinski <ayufan@ayufan.eu>2016-06-07 13:06:24 +0200
commit03a7569ea6952b47c3f25294e94cb3abf1877d5d (patch)
treed32bbb48af0bc1fc5166102ced7fbc1d79a711d5 /scripts/prepare_build.sh
parent498f8d13d003b1d9a50babfd45911ef55e905ba5 (diff)
downloadgitlab-ce-03a7569ea6952b47c3f25294e94cb3abf1877d5d.tar.gz
Rerun failed spinach tests
Diffstat (limited to 'scripts/prepare_build.sh')
-rwxr-xr-xscripts/prepare_build.sh10
1 files changed, 7 insertions, 3 deletions
diff --git a/scripts/prepare_build.sh b/scripts/prepare_build.sh
index 247383aa46c..d6fb1a34e8c 100755
--- a/scripts/prepare_build.sh
+++ b/scripts/prepare_build.sh
@@ -1,12 +1,16 @@
#!/bin/bash
retry() {
- for i in $(seq 1 3); do
+ if eval "$@"; then
+ return 0
+ fi
+
+ for i in 2 1; do
+ sleep 3s
+ echo "Retrying $i..."
if eval "$@"; then
return 0
fi
- sleep 3s
- echo "Retrying..."
done
return 1
}