Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor .travis.yml by introducing travis_retry.sh
Not using official travis_retry.bash, because it's not supporting to modify backoff seconds. https://github.com/travis-ci/travis-build/blob/0ad8f1886b2c31994d847e126dc5842b7b3513e3/lib/travis/build/bash/travis_retry.bash Not using official `travis_apt_get_update` function because it does not propagate exit status to be used by retries. https://github.com/travis-ci/travis-build/blob/0ad8f1886b2c31994d847e126dc5842b7b3513e3/lib/travis/build/bash/travis_apt_get_update.bash Co-Authored-By: Nobuyoshi Nakada <nobu@ruby-lang.org>
- Loading branch information
Showing
2 changed files
with
66 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/sh -eu | ||
# The modified version of `travis_retry` to support custom backoffs, which is used by .travis.yml. | ||
# https://github.com/travis-ci/travis-build/blob/master/lib/travis/build/bash/travis_retry.bash | ||
|
||
for sleep in 0 ${WAITS:- 1 25 100}; do | ||
sleep "$sleep" | ||
|
||
echo "+ $@" | ||
if "$@"; then | ||
exit 0 | ||
fi | ||
done | ||
exit 1 |