diff options
author | Zhijiang Hu <hu.zhijiang@zte.com.cn> | 2018-01-11 22:28:47 -0500 |
---|---|---|
committer | Zhijiang Hu <hu.zhijiang@zte.com.cn> | 2018-01-11 22:30:25 -0500 |
commit | 3a8bff9b7ecaf2d6c6861838ab50845e0f2b60aa (patch) | |
tree | aee6362881579d3b0732067c944f3a887e31ac2e /jjb | |
parent | 071c4bc5708601763941d61c502f800e3460be6b (diff) |
[daisy] Retry if download opnfv.bin failed
Download from http://build.opnfv.org/artifacts.opnfv.org may fail [1]
so we need retry to make CI stable.
[1] https://build.opnfv.org/ci/job/daisy-deploy-baremetal-daily-master/374/console
Change-Id: I62837038c7f124870814a68e4b87a8e89ba8c58c
Signed-off-by: Zhijiang Hu <hu.zhijiang@zte.com.cn>
Diffstat (limited to 'jjb')
-rwxr-xr-x | jjb/daisy4nfv/daisy4nfv-download-artifact.sh | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/jjb/daisy4nfv/daisy4nfv-download-artifact.sh b/jjb/daisy4nfv/daisy4nfv-download-artifact.sh index a64c80e5c..ae5ca3813 100755 --- a/jjb/daisy4nfv/daisy4nfv-download-artifact.sh +++ b/jjb/daisy4nfv/daisy4nfv-download-artifact.sh @@ -68,7 +68,15 @@ else DOWNLOAD_CMD="curl -L -s -o $WORKSPACE/opnfv.bin" fi -$DOWNLOAD_CMD http://$OPNFV_ARTIFACT_URL > gsutil.bin.log 2>&1 +maxretries=3 +cnt=0 +rc=1 +while [ $cnt -lt $maxretries ] && [ $rc -ne 0 ] +do + cnt=$[cnt + 1] + $DOWNLOAD_CMD http://$OPNFV_ARTIFACT_URL > gsutil.bin.log 2>&1 + rc=$? +done # list the file ls -al $WORKSPACE/opnfv.bin |