summaryrefslogtreecommitdiffstats
path: root/jjb/daisy4nfv
diff options
context:
space:
mode:
authorAlex Yang <yangyang1@zte.com.cn>2017-04-24 23:09:16 +0800
committerAlex Yang <yangyang1@zte.com.cn>2017-04-28 12:10:32 +0800
commitc3471b1759a7b1af9ddf9a3da5e7cf5df879a078 (patch)
tree8d70e2f7212c80a287f233c36816ce7dc3144f4f /jjb/daisy4nfv
parentdae7719231115b7169a4e0feb02bde194ca8252a (diff)
Improve daisy download speed by multi-thread tool
Use multi-thread tool such as aria2c to download the daisy image, to reduce the time spent on downloading. Change-Id: Id1b7f9195fe0d499b9b02b0a8410e02871f675f9 Signed-off-by: Alex Yang <yangyang1@zte.com.cn>
Diffstat (limited to 'jjb/daisy4nfv')
-rwxr-xr-xjjb/daisy4nfv/daisy4nfv-download-artifact.sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/jjb/daisy4nfv/daisy4nfv-download-artifact.sh b/jjb/daisy4nfv/daisy4nfv-download-artifact.sh
index 1cc0443ad..6107f9de2 100755
--- a/jjb/daisy4nfv/daisy4nfv-download-artifact.sh
+++ b/jjb/daisy4nfv/daisy4nfv-download-artifact.sh
@@ -57,12 +57,18 @@ fi
# log info to console
echo "Downloading the $INSTALLER_TYPE artifact using URL http://$OPNFV_ARTIFACT_URL"
-echo "This could take some time..."
+echo "This could take some time... Now the time is $(date -u)"
echo "--------------------------------------------------------"
echo
# download the file
-curl -L -s -o $WORKSPACE/opnfv.bin http://$OPNFV_ARTIFACT_URL > gsutil.bin.log 2>&1
+if [[ "$NODE_NAME" =~ (zte) ]] && [ -x "$(command -v aria2c)" ]; then
+ DOWNLOAD_CMD="aria2c -x 3"
+else
+ DOWNLOAD_CMD="curl -L -s"
+fi
+
+$DOWNLOAD_CMD -o $WORKSPACE/opnfv.bin http://$OPNFV_ARTIFACT_URL > gsutil.bin.log 2>&1
# list the file
ls -al $WORKSPACE/opnfv.bin