fuel: fix daily build without properties file 75/30875/1
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Fri, 17 Mar 2017 17:38:08 +0000 (18:38 +0100)
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Fri, 17 Mar 2017 17:39:17 +0000 (18:39 +0100)
For the first time the daily build is ran, the properties file
for the latest ISO built is not present.

JIRA: FUEL-262

Change-Id: I842668bfde4c84cd3ba31571df274633ae238a90
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
jjb/fuel/fuel-build.sh

index c66dc3d..e1a4c02 100755 (executable)
@@ -25,8 +25,10 @@ if [[ "$JOB_NAME" =~ "daily" ]]; then
     echo "Checking to see if we already built and stored Fuel ISO for this commit"
 
     curl -s -o $LATEST_ISO_PROPERTIES http://$GS_URL/latest.properties 2>/dev/null
+fi
 
-    # get metadata of latest ISO
+# get metadata of latest ISO
+if grep -q OPNFV_GIT_SHA1 $LATEST_ISO_PROPERTIES 2>/dev/null; then
     LATEST_ISO_SHA1=$(grep OPNFV_GIT_SHA1 $LATEST_ISO_PROPERTIES | cut -d'=' -f2)
     LATEST_ISO_URL=$(grep OPNFV_ARTIFACT_URL $LATEST_ISO_PROPERTIES | cut -d'=' -f2)
 else