Merge "Create generic jenkins job to build and push a docker image"
[releng.git] / jjb / fuel / fuel-download-artifact.sh
index 6eb1ba4..05dc05e 100755 (executable)
@@ -3,8 +3,13 @@ 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
+    # 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
+    curl -s -o $WORKSPACE/latest.properties http://$GS_URL/latest.properties
+fi
 
 # check if we got the file
 [[ -f latest.properties ]] || exit 1