Fuel: run curl command with parameter L to follow redirects 85/24385/3
authorwu.zhihui <wu.zhihui1@zte.com.cn>
Wed, 16 Nov 2016 07:12:25 +0000 (15:12 +0800)
committerFatih Degirmenci <fatih.degirmenci@ericsson.com>
Fri, 18 Nov 2016 14:08:01 +0000 (14:08 +0000)
Since ZTE PODs use url http://build.opnfv.org/artifacts.opnfv.org/ to
download files, it should run curl command with parameter L to follow
redirects.
It does not affect PODs which use url http://artifacts.opnfv.org/

JIRA: FUEL-225

Change-Id: I63b808657ee4f26b801e492b53bc8e4b27396587
Signed-off-by: wu.zhihui <wu.zhihui1@zte.com.cn>
jjb/fuel/fuel-download-artifact.sh

index 3f691d8..fd824ca 100755 (executable)
@@ -16,11 +16,11 @@ set -o pipefail
 if [[ "$JOB_NAME" =~ "merge" ]]; then
     echo "Downloading http://$GS_URL/opnfv-gerrit-$GERRIT_CHANGE_NUMBER.properties"
     # get the properties file for the Fuel ISO built for a merged change
-    curl -s -o $WORKSPACE/latest.properties http://$GS_URL/opnfv-gerrit-$GERRIT_CHANGE_NUMBER.properties
+    curl -L -s -o $WORKSPACE/latest.properties http://$GS_URL/opnfv-gerrit-$GERRIT_CHANGE_NUMBER.properties
 else
     # get the latest.properties file in order to get info regarding latest artifact
     echo "Downloading http://$GS_URL/latest.properties"
-    curl -s -o $WORKSPACE/latest.properties http://$GS_URL/latest.properties
+    curl -L -s -o $WORKSPACE/latest.properties http://$GS_URL/latest.properties
 fi
 
 # check if we got the file