Merge "kvmfornfv: Use correct url for uploading artifacts"
authorFatih Degirmenci <fatih.degirmenci@ericsson.com>
Wed, 7 Sep 2016 12:36:40 +0000 (12:36 +0000)
committerGerrit Code Review <gerrit@172.30.200.206>
Wed, 7 Sep 2016 12:36:40 +0000 (12:36 +0000)
jjb/kvmfornfv/kvmfornfv-upload-artifact.sh

index 422626e..6f8fff3 100755 (executable)
@@ -35,6 +35,7 @@ esac
     echo "OPNFV_ARTIFACT_URL=$GS_UPLOAD_LOCATION"
     echo "OPNFV_BUILD_URL=$BUILD_URL"
 ) > $WORKSPACE/opnfv.properties
+source $WORKSPACE/opnfv.properties
 
 # upload artifacts
 gsutil cp -r $WORKSPACE/build_output/* $GS_UPLOAD_LOCATION > $WORKSPACE/gsutil.log 2>&1
@@ -45,11 +46,11 @@ gsutil -m setmeta -r \
 # upload metadata file for the artifacts built by daily job
 if [[ "$JOB_TYPE" == "daily" ]]; then
     gsutil cp $WORKSPACE/opnfv.properties $GS_UPLOAD_LOCATION/opnfv.properties > $WORKSPACE/gsutil.log 2>&1
-    gsutil cp $WORKSPACE/opnfv.properties $GS_URL/latest.properties > $WORKSPACE/gsutil.log 2>&1
+    gsutil cp $WORKSPACE/opnfv.properties gs://$GS_URL/latest.properties > $WORKSPACE/gsutil.log 2>&1
     gsutil -m setmeta -r \
         -h "Cache-Control:private, max-age=0, no-transform" \
-        $GS_UPLOAD_LOCATION/opnfv-${OPNFV_ARTIFACT_VERSION}.properties \
-        $GS_URL/latest.properties > /dev/null 2>&1
+        $GS_UPLOAD_LOCATION/opnfv.properties \
+        gs://$GS_URL/latest.properties > /dev/null 2>&1
 fi
 
 gsutil ls $GS_UPLOAD_LOCATION > /dev/null 2>&1