mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 23:15:14 +00:00
Merge pull request #26533 from gmarek/retries
Automatic merge from submit-queue Add retries for make in start-kubemark Fix. #25872
This commit is contained in:
commit
b6a7be6f66
@ -57,7 +57,19 @@ fi
|
||||
|
||||
CURR_DIR=`pwd`
|
||||
cd "${MAKE_DIR}"
|
||||
make
|
||||
RETRIES=3
|
||||
for attempt in $(seq 1 ${RETRIES}); do
|
||||
if ! make; then
|
||||
if [[ $((attempt)) -eq "${RETRIES}" ]]; then
|
||||
echo "${color_red}Make failed. Exiting.${color_norm}"
|
||||
exit 1
|
||||
fi
|
||||
echo -e "${color_yellow}Make attempt $(($attempt)) failed. Retrying.${color_norm}" >& 2
|
||||
sleep $(($attempt * 5))
|
||||
else
|
||||
break
|
||||
fi
|
||||
done
|
||||
rm kubemark
|
||||
cd $CURR_DIR
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user