forked from ClickHouse/ClickHouse
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #600 from Altinity/22.8-fix-runner-labels
22.8 Fix CI/CD
- Loading branch information
Showing
13 changed files
with
796 additions
and
718 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/bash | ||
# Execute command until exitcode is 0 or | ||
# maximum number of retries is reached | ||
# Example: | ||
# ./retry <retries> <delay> <command> | ||
retries=$1 | ||
delay=$2 | ||
command="${@:3}" | ||
exitcode=0 | ||
try=0 | ||
until [ "$try" -ge $retries ] | ||
do | ||
echo "$command" | ||
eval "$command" | ||
exitcode=$? | ||
if [ $exitcode -eq 0 ]; then | ||
break | ||
fi | ||
try=$((try+1)) | ||
sleep $2 | ||
done | ||
exit $exitcode |
Oops, something went wrong.