Skip to content

Commit

Permalink
Undo retry changes
Browse files Browse the repository at this point in the history
  • Loading branch information
marc-gr committed Dec 27, 2024
1 parent 9f01f00 commit 7bdbad7
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 28 deletions.
5 changes: 0 additions & 5 deletions .buildkite/hooks/pre-command
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@

set -euo pipefail

# needed in some systems where retry is not available
if ! declare -f retry > /dev/null; then
source "${BUILDKITE_HOOK_PATH}/../scripts/retry.sh"
fi

# Secrets must be redacted
# https://buildkite.com/docs/pipelines/managing-log-output#redacted-environment-variables
PRIVATE_CI_GCS_CREDENTIALS_PATH="kv/ci-shared/platform-ingest/gcp-platform-ingest-ci-service-account"
Expand Down
19 changes: 18 additions & 1 deletion .buildkite/scripts/install_macos_tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,24 @@ PLATFORM_TYPE_LOWERCASE=$(uname | tr '[:upper:]' '[:lower:]')

export BIN=${WORKSPACE:-$PWD}/bin

source ./retry.sh
retry() {
local retries=$1
shift
local count=0
until "$@"; do
exit=$?
wait=$((2 ** count))
count=$((count + 1))
if [ $count -lt "$retries" ]; then
>&2 echo "Retry $count/$retries exited $exit, retrying in $wait seconds..."
sleep $wait
else
>&2 echo "Retry $count/$retries exited $exit, no more retries left."
return $exit
fi
done
return 0
}

create_workspace() {
if [[ ! -d "${BIN}" ]]; then
Expand Down
22 changes: 0 additions & 22 deletions .buildkite/scripts/retry.sh

This file was deleted.

0 comments on commit 7bdbad7

Please sign in to comment.