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 export MIRRORS_BASE="https://rust-lang-ci-mirrors.s3-us-west-1.amazonaws.com/rustc"
9 # See http://unix.stackexchange.com/questions/82598
10 # Duplicated in docker/dist-various-2/shared.sh
12 echo "Attempting with retry:" "$@"
17 if [[ $n -lt $max ]]; then
18 sleep $n # don't retry immediately
20 echo "Command failed. Attempt $n/$max:"
22 echo "The command has failed after $n attempts."
30 [ "$CI" = "true" ] || [ "$TF_BUILD" = "True" ]
34 [ "$AGENT_OS" = "Darwin" ]
38 [ "$AGENT_OS" = "Windows_NT" ]
42 [ "$AGENT_OS" = "Linux" ]
45 function getCIBranch {
46 echo "$BUILD_SOURCEBRANCHNAME"
49 function ciCommandAddPath {
50 if [[ $# -ne 1 ]]; then
51 echo "usage: $0 <path>"
56 echo "##vso[task.prependpath]${path}"
59 function ciCommandSetEnv {
60 if [[ $# -ne 2 ]]; then
61 echo "usage: $0 <name> <value>"
67 echo "##vso[task.setvariable variable=${name}]${value}"