[Qa-jenkins-scm] [jenkins.debian.net] 01/01: reproducible/openwrt|lede: retry downloads 5 times
Holger Levsen
holger at layer-acht.org
Fri Apr 28 11:59:11 UTC 2017
This is an automated email from the git hooks/post-receive script.
holger pushed a commit to branch master
in repository jenkins.debian.net.
commit af624f5c8e11817a27302eaaccedb410dbdd71c9
Author: Alexander Couzens <lynxis at fe80.eu>
Date: Fri Apr 28 13:54:59 2017 +0200
reproducible/openwrt|lede: retry downloads 5 times
Signed-off-by: Holger Levsen <holger at layer-acht.org>
---
bin/reproducible_lede_common.sh | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/bin/reproducible_lede_common.sh b/bin/reproducible_lede_common.sh
index 38cc2a5..ddfddc6 100644
--- a/bin/reproducible_lede_common.sh
+++ b/bin/reproducible_lede_common.sh
@@ -237,6 +237,7 @@ openwrt_download() {
local TARGET=$1
local CONFIG=$2
local TMPDIR=$3
+ local tries=5
cd $TMPDIR/download
@@ -253,7 +254,15 @@ openwrt_download() {
# configure openwrt because otherwise it wont download everything
openwrt_config $CONFIG
- make download -j $NUM_CPU IGNORE_ERRORS=ym BUILD_LOG=1
+ while ! make download -j $NUM_CPU IGNORE_ERRORS=ym BUILD_LOG=1 ; do
+ tries=$((tries - 1))
+ if [ $tries -eq 0 ] ; then
+ echo "================================================================================"
+ echo "$(date -u) - Failed to download sources"
+ echo "================================================================================"
+ exit 1
+ fi
+ done
}
openwrt_get_banner() {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git
More information about the Qa-jenkins-scm
mailing list