Adding images upload for pharos, octopus, genesis, functest 25/425/1
authorVictor Laza <vlaza@cloudbasesolutions.com>
Tue, 28 Apr 2015 08:56:41 +0000 (11:56 +0300)
committerVictor Laza <vlaza@cloudbasesolutions.com>
Tue, 28 Apr 2015 08:56:41 +0000 (11:56 +0300)
JIRA: Adding images upload for pharos, octopus, genesis, functest
for documentation artifacts as .html ones did not had images shown because they
were not part of the upload to artifactory part.

Change-Id: Ia85b71f5f84c3d018db16778b8c85a88ce688dc2
Signed-off-by: Victor Laza <vlaza@cloudbasesolutions.com>
jjb/functest/build-upload-docu.sh
jjb/genesis/build-docu.sh
jjb/octopus/build-upload-docu.sh
jjb/pharos/build-upload-docu.sh

index bd5abdb..f9da084 100644 (file)
@@ -40,3 +40,22 @@ for file in "${{files[@]}}"; do
 
 done
 
 
 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"
+        cat "$img" | gsutil cp -L gsoutput.txt - \
+        gs://artifacts.opnfv.org/"$project"/"$img"
+        gsutil setmeta -h "Content-Type:image/jpeg" \
+                        -h "Cache-Control:private, max-age=0, no-transform" \
+                        gs://artifacts.opnfv.org/"$project"/"$img"
+        cat gsoutput.txt
+        rm -f gsoutput.txt
+
+done
+
index b3869fc..701768b 100644 (file)
@@ -36,3 +36,22 @@ for file in "${{files[@]}}"; do
 
 done
 
 
 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"
+        cat "$img" | gsutil cp -L gsoutput.txt - \
+        gs://artifacts.opnfv.org/"$project"/"$img"
+        gsutil setmeta -h "Content-Type:image/jpeg" \
+                        -h "Cache-Control:private, max-age=0, no-transform" \
+                        gs://artifacts.opnfv.org/"$project"/"$img"
+        cat gsoutput.txt
+        rm -f gsoutput.txt
+
+done
+
index 81f875d..beb4cd1 100644 (file)
@@ -40,3 +40,22 @@ for file in "${{files[@]}}"; do
 
 done
 
 
 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"
+        cat "$img" | gsutil cp -L gsoutput.txt - \
+        gs://artifacts.opnfv.org/"$project"/"$img"
+        gsutil setmeta -h "Content-Type:image/jpeg" \
+                        -h "Cache-Control:private, max-age=0, no-transform" \
+                        gs://artifacts.opnfv.org/"$project"/"$img"
+        cat gsoutput.txt
+        rm -f gsoutput.txt
+
+done
+
index caf1021..36e0400 100644 (file)
@@ -40,3 +40,22 @@ for file in "${{files[@]}}"; do
 
 done
 
 
 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"
+        cat "$img" | gsutil cp -L gsoutput.txt - \
+        gs://artifacts.opnfv.org/"$project"/"$img"
+        gsutil setmeta -h "Content-Type:image/jpeg" \
+                        -h "Cache-Control:private, max-age=0, no-transform" \
+                        gs://artifacts.opnfv.org/"$project"/"$img"
+        cat gsoutput.txt
+        rm -f gsoutput.txt
+
+done
+