From fb331665c5b85f6ea3258fe4c9f3e287b25ed41b Mon Sep 17 00:00:00 2001 From: Victor Laza Date: Tue, 28 Apr 2015 11:56:41 +0300 Subject: Adding images upload for pharos, octopus, genesis, functest 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 --- jjb/genesis/build-docu.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'jjb/genesis/build-docu.sh') diff --git a/jjb/genesis/build-docu.sh b/jjb/genesis/build-docu.sh index b3869fcf7..701768bcd 100644 --- a/jjb/genesis/build-docu.sh +++ b/jjb/genesis/build-docu.sh @@ -36,3 +36,22 @@ 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" + 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 + -- cgit 1.2.3-korg