-
Notifications
You must be signed in to change notification settings - Fork 532
CI: Add retry script for Docker commands #2516
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2516 +/- ##
==========================================
+ Coverage 66.84% 66.88% +0.04%
==========================================
Files 327 327
Lines 42479 42479
Branches 5268 5268
==========================================
+ Hits 28393 28411 +18
+ Misses 13381 13366 -15
+ Partials 705 702 -3
Continue to review full report at Codecov.
|
There are some limits to this script WRT multi-command behavior. $ tools/retry_cmd.sh -n 2 -s 1 "echo TEST && exit 2"; echo $?
sh: echo TEST && exit 2: command not found
sh: echo TEST && exit 2: command not found
127
$ tools/retry_cmd.sh -n 2 -s 1 echo TEST "&&" exit 2; echo $?
TEST && exit 2
0 But for the current purposes this seems fine. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a lot more readable than before. Please check the comment I left above.
# | ||
# 2018 Chris Markiewicz | ||
# Released into public domain | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't this need to set set +o pipefail
here to work? After some digging, I think the original problem reported in #2489 is just that the steps are run with set -eo pipefile
(circle has started to run it with 2.0). Using both -eo will make the script to exit even with that || true
pipe.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, because those apply to each instance of the shell. It doesn't infect subprocesses.
Fixes #2489.
Changes proposed in this pull request
retry_cmd.sh
script.circleci/config.yml