Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Docker Build Images
scripts
Commits
2124611f
Commit
2124611f
authored
Sep 09, 2019
by
Markus Frosch
Browse files
rpm: Retry network actions
To avoid issues with mirrors of distributions
parent
1c26dfe5
Changes
2
Hide whitespace changes
Inline
Side-by-side
icinga-build-rpm-binary
View file @
2124611f
...
...
@@ -18,20 +18,20 @@ case "$ICINGA_BUILD_OS" in
(
set
-ex
# Note: force rebuilding here, because zypper is a bit dumb
sudo
zypper
--non-interactive
clean
--all
sudo
zypper
--non-interactive
--no-gpg-checks
--gpg-auto-import-keys
ref
-fs
run-retry-timeout
sudo
zypper
--non-interactive
clean
--all
run-retry-timeout
sudo
zypper
--non-interactive
--no-gpg-checks
--gpg-auto-import-keys
ref
-fs
)
;;
*
)
(
if
command
-v
dnf &>/dev/null
;
then
set
-ex
sudo
dnf clean expire-cache
sudo
dnf makecache
run-retry-timeout
sudo
dnf clean expire-cache
run-retry-timeout
sudo
dnf makecache
else
set
-ex
sudo
yum clean expire-cache
sudo
yum makecache fast
run-retry-timeout
sudo
yum clean expire-cache
run-retry-timeout
sudo
yum makecache fast
fi
)
;;
...
...
@@ -43,17 +43,17 @@ case "$ICINGA_BUILD_OS" in
(
set
-ex
# shellcheck disable=SC2046
sudo
zypper
--non-interactive
install
$(
rpm
-qpR
"
${
source_rpm
}
"
)
run-retry-timeout
sudo
zypper
--non-interactive
install
$(
rpm
-qpR
"
${
source_rpm
}
"
)
)
;;
*
)
(
if
command
-v
dnf-builddep
>
/dev/null
;
then
set
-ex
sudo
dnf-builddep
-y
"
${
source_rpm
}
"
run-retry-timeout
sudo
dnf-builddep
-y
"
${
source_rpm
}
"
else
set
-ex
sudo
yum-builddep
-y
"
${
source_rpm
}
"
run-retry-timeout
sudo
yum-builddep
-y
"
${
source_rpm
}
"
fi
)
;;
...
...
icinga-build-rpm-test
View file @
2124611f
...
...
@@ -26,7 +26,7 @@ REPO
(
set
-ex
#sudo zypper --non-interactive clean --all
sudo
zypper
--non-interactive
--no-gpg-checks
--gpg-auto-import-keys
ref
-fs
run-retry-timeout
sudo
zypper
--non-interactive
--no-gpg-checks
--gpg-auto-import-keys
ref
-fs
# Just use the local dir, zypper will take care of the rest!
if
!
sudo
zypper lr |
grep
-q
"
$repository
"
;
then
...
...
Write
Preview
Supports
Markdown
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