Set nocache for fuel artifacts on artifacts.opnfv.org
[releng.git] / jjb / fuel / fuel-download-artifact.sh
index 6eb1ba4..917bc97 100755 (executable)
@@ -3,8 +3,15 @@ set -o errexit
 set -o nounset
 set -o pipefail
 
-# get the latest.properties file in order to get info regarding latest artifact
-curl -s -o $WORKSPACE/latest.properties http://$GS_URL/latest.properties
+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
+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
+fi
 
 # check if we got the file
 [[ -f latest.properties ]] || exit 1
@@ -13,7 +20,7 @@ curl -s -o $WORKSPACE/latest.properties http://$GS_URL/latest.properties
 source latest.properties
 
 # log info to console
-echo "Downloading the $INSTALLER artifact using URL http://$OPNFV_ARTIFACT_URL"
+echo "Downloading the $INSTALLER_TYPE artifact using URL http://$OPNFV_ARTIFACT_URL"
 echo "This could take some time..."
 echo "--------------------------------------------------------"
 echo