Skip to content
Snippets Groups Projects
Commit d2d82907 authored by Rohit Gupta's avatar Rohit Gupta
Browse files

Gitlab CI: command to retry git clone in case of network failure

parent 47e0589a
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
#Simple script to retry git clone in case of failure
REALGIT=/usr/bin/git
RETRIES=10
DELAY=10
COUNT=1
while [ $COUNT -lt $RETRIES ]; do
$REALGIT $*
if [ $? -eq 0 ]; then
RETRIES=0
break
fi
let COUNT=$COUNT+1
sleep $DELAY
done
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment