Adding upload images part for documentation build - opnfvdocs 13/413/1
authorVictor Laza <vlaza@cloudbasesolutions.com>
Mon, 27 Apr 2015 15:16:17 +0000 (18:16 +0300)
committerVictor Laza <vlaza@cloudbasesolutions.com>
Mon, 27 Apr 2015 15:16:17 +0000 (18:16 +0300)
JIRA: Adding upload images part for documentation build - opnfvdocs

Change-Id: I206ef5245f6a55cceea3883d8c5a129f0530a90b
Signed-off-by: Victor Laza <vlaza@cloudbasesolutions.com>
jjb/opnfvdocs/build-upload-docu.sh

index b743726..23e7838 100644 (file)
@@ -40,3 +40,22 @@ for file in "${{files[@]}}"; do
 
 done
 
+
+images=()
+
+while read -r -d ''; do
+        files+=("$REPLY")
+done < <(find * -type f \( -iname \*.jpg -o -iname \*.png \) -print0)
+
+for img in "${{images[@]}}"; do
+
+       # uploading found images
+       echo "uploading $img"
+        gs://artifacts.opnfv.org/"$project"/"$img"
+        gsutil setmeta -h "Content-Type:text/html" \
+                        -h "Cache-Control:private, max-age=0, no-transform" \
+                        gs://artifacts.opnfv.org/"$project"/"$img"
+        cat gsoutput.txt
+        rm -f gsoutput.txt
+
+done