6 if [[ "$JOB_NAME" =~ "merge" ]]; then
7 echo "Downloading http://$GS_URL/opnfv-gerrit-$GERRIT_CHANGE_NUMBER.properties"
8 # get the properties file for the Fuel ISO built for a merged change
9 curl -s -o $WORKSPACE/latest.properties http://$GS_URL/opnfv-gerrit-$GERRIT_CHANGE_NUMBER.properties
11 # get the latest.properties file in order to get info regarding latest artifact
12 echo "Downloading http://$GS_URL/latest.properties"
13 curl -s -o $WORKSPACE/latest.properties http://$GS_URL/latest.properties
16 # check if we got the file
17 [[ -f latest.properties ]] || exit 1
19 # source the file so we get artifact metadata
20 source latest.properties
22 # echo the info about artifact that is used during the deployment
23 OPNFV_ARTIFACT=${OPNFV_ARTIFACT_URL/*\/}
24 echo "Using $OPNFV_ARTIFACT for deployment"
26 # check if we already have the ISO to avoid redownload
27 ISO_STORE=$HOME/opnfv/iso_store/fuel
28 if [[ -f "$ISO_STORE/$OPNFV_ARTIFACT" ]]; then
29 echo "ISO already exists. Skipping the download"
30 ln -s $ISO_STORE/$OPNFV_ARTIFACT $WORKSPACE/opnfv.iso
31 ls -al $WORKSPACE/opnfv.iso
36 echo "Downloading the $INSTALLER_TYPE artifact using URL http://$OPNFV_ARTIFACT_URL"
37 echo "This could take some time..."
38 echo "--------------------------------------------------------"
42 curl -s -o $WORKSPACE/opnfv.iso http://$OPNFV_ARTIFACT_URL > gsutil.iso.log 2>&1
45 ls -al $WORKSPACE/opnfv.iso
48 echo "--------------------------------------------------------"