Skip to content

Commit

Permalink
Move retries to _homebrew_base_setup
Browse files Browse the repository at this point in the history
Signed-off-by: Addisu Z. Taddese <[email protected]>
  • Loading branch information
azeey committed Oct 12, 2023
1 parent 5696800 commit 33c0951
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
10 changes: 9 additions & 1 deletion jenkins-scripts/lib/_homebrew_base_setup.bash
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,15 @@ fi

git -C $(${BREW_BINARY} --repo) fsck
export HOMEBREW_UPDATE_TO_TAG=1
${BREW_BINARY} update

# There might be a background process that blocks `brew update`, so we try to
# run it several times until it succeeds.
# See https://github.com/Homebrew/brew/issues/1155
brew_update_retry_count=0
until ${BREW_BINARY} update || (( brew_update_retry_count++ > 6 ))
do
sleep 10
done
# manually exclude a ruby warning that jenkins thinks is from clang
# https://github.com/osrf/homebrew-simulation/issues/1343
${BREW_BINARY} install ${BREW_BASE_DEPENDCIES} \
Expand Down
10 changes: 0 additions & 10 deletions jenkins-scripts/lib/_homebrew_cleanup.bash
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,6 @@ git stash && git clean -d -f
${BREW_BINARY} audit cmake || restore_brew
popd 2> /dev/null

# There might be a background process that blocks `brew update`, so we try to
# run it several times until it succeeds.
# See https://github.com/Homebrew/brew/issues/1155
brew_update_retry_count=0
until brew update || (( brew_update_retry_count++ > 6 ))
do
brew update
sleep 10
done

# test-bot needs variables and does not work just with config not sure why
export GIT_AUTHOR_NAME="OSRF Build Bot"
export GIT_COMMITTER_NAME=${GIT_AUTHOR_NAME}
Expand Down

0 comments on commit 33c0951

Please sign in to comment.