Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
fengzch-das
multibuild
Commits
545f42cd
Commit
545f42cd
authored
May 30, 2017
by
Matthew Brett
Browse files
Use retry for docker pull command
parent
89c87b8b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
1 deletion
+19
-1
common_utils.sh
common_utils.sh
+18
-0
travis_linux_steps.sh
travis_linux_steps.sh
+1
-1
No files found.
common_utils.sh
View file @
545f42cd
...
...
@@ -333,3 +333,21 @@ function get_pypy_build_prefix {
exit 1
fi
}
retry () {
# Retry command (with arguments) up to 5 times
# https://gist.github.com/fungusakafungus/1026804
local retry_max=5
local count=
$retry_max
while [
$count
-gt 0 ]; do
"
$@
" && break
count=
$((
$count
-
1
))
sleep 1
done
[
$count
-eq 0 ] && {
echo "
Retry failed
[
$retry_max
]
:
$@
" >&2
return 1
}
return 0
}
travis_linux_steps.sh
View file @
545f42cd
...
...
@@ -78,7 +78,7 @@ function build_multilinux {
[
-z
"
$plat
"
]
&&
echo
"plat not defined"
&&
exit
1
local
build_cmds
=
"
$2
"
local
docker_image
=
quay.io/pypa/manylinux1_
$plat
docker pull
$docker_image
retry
docker pull
$docker_image
docker run
--rm
\
-e
BUILD_COMMANDS
=
"
$build_cmds
"
\
-e
PYTHON_VERSION
=
"
$MB_PYTHON_VERSION
"
\
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment