Typo fix in build-upload-docu.sh, images=() instead of files=() at img upload
[releng.git] / jjb / opnfvdocs / build-upload-docu.sh
index b743726..9714993 100644 (file)
@@ -40,3 +40,20 @@ for file in "${{files[@]}}"; do
 
 done
 
+images=()
+while read -r -d ''; do
+        images+=("$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