capture the location of published artifacts and output them all at the bottom 67/667/3
authorAric Gardner <agardner@linuxfoundation.org>
Wed, 27 May 2015 13:57:27 +0000 (09:57 -0400)
committerAric Gardner <agardner@linuxfoundation.org>
Wed, 27 May 2015 14:23:27 +0000 (10:23 -0400)
This should work for the verify jobs as well now

Change-Id: Ib96ed226894aca2e01c30603d08965256125d604
JIRA: DOCS-36
Signed-off-by: Aric Gardner <agardner@linuxfoundation.org>
jjb/opnfvdocs/docu-build.sh
jjb/opnfvdocs/opnfvdocs.yml

index 499bdbe..063ae1c 100644 (file)
@@ -8,6 +8,11 @@ export PATH=$PATH:/usr/local/bin/
 git_sha1="$(git rev-parse HEAD)"
 docu_build_date="$(date)"
 
+if $GERRIT_EVENT_TYPE="patchset-created"; then
+    patchset="/$GERRIT_CHANGE_NUMBER"
+fi
+
+
 files=()
 while read -r -d ''; do
        files+=("$REPLY")
@@ -28,7 +33,7 @@ for file in "${{files[@]}}"; do
        gs://artifacts.opnfv.org/"$project"/"$gs_cp_folder".html
        gsutil setmeta -h "Content-Type:text/html" \
                        -h "Cache-Control:private, max-age=0, no-transform" \
-                       gs://artifacts.opnfv.org/"$project"/"$gs_cp_folder".html
+                       gs://artifacts.opnfv.org/"$project""$patchset"/"$gs_cp_folder".html
        cat gsoutput.txt
        rm -f gsoutput.txt
 
@@ -37,10 +42,13 @@ for file in "${{files[@]}}"; do
        gs://artifacts.opnfv.org/"$project"/"$gs_cp_folder".pdf
        gsutil setmeta -h "Content-Type:application/pdf" \
                        -h "Cache-Control:private, max-age=0, no-transform" \
-                       gs://artifacts.opnfv.org/"$project"/"$gs_cp_folder".pdf
+                       gs://artifacts.opnfv.org/"$project""$patchset"/"$gs_cp_folder".pdf
        cat gsoutput.txt
        rm -f gsoutput.txt
 
+  links+="http://artifacts.opnfv.org/"$project""$patchset"/"$gs_cp_folder".html \n"
+  links+="http://artifacts.opnfv.org/"$project""$patchset"/"$gs_cp_folder".pdf \n"
+
 done
 
 images=()
@@ -61,3 +69,5 @@ for img in "${{images[@]}}"; do
         rm -f gsoutput.txt
 
 done
+
+echo -e "$links"
index 39e33eb..7057aa3 100644 (file)
 
     builders:
         - shell:
-            !include-raw docu-verify.sh
+            !include-raw docu-build.sh
 
 - job-template:
     name: 'opnfvdocs-merge'