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:
k8s-merge-robot 2016-06-02 10:49:28 -07:00
commit b6a7be6f66

View File

@ -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