3 # This file is intended to be sourced with `. shared.sh` or
4 # `source shared.sh`, hence the invalid shebang and not being
5 # marked as an executable file in git.
7 # See http://unix.stackexchange.com/questions/82598
8 # Duplicated in docker/dist-various-2/shared.sh
10 echo "Attempting with retry:" "$@"
15 if [[ $n -lt $max ]]; then
16 sleep $n # don't retry immediately
18 echo "Command failed. Attempt $n/$max:"
20 echo "The command has failed after $n attempts."
28 [ "$CI" = "true" ] || [ "$TF_BUILD" = "True" ]
32 [ "$AGENT_OS" = "Darwin" ]
35 function getCIBranch {
36 echo "$BUILD_SOURCEBRANCHNAME"