summaryrefslogtreecommitdiffstats
path: root/jjb/opnfvdocs/docu-build.sh
diff options
context:
space:
mode:
Diffstat (limited to 'jjb/opnfvdocs/docu-build.sh')
-rw-r--r--jjb/opnfvdocs/docu-build.sh11
1 files changed, 5 insertions, 6 deletions
diff --git a/jjb/opnfvdocs/docu-build.sh b/jjb/opnfvdocs/docu-build.sh
index ade400d89..057cc97d1 100644
--- a/jjb/opnfvdocs/docu-build.sh
+++ b/jjb/opnfvdocs/docu-build.sh
@@ -8,11 +8,10 @@ export PATH=$PATH:/usr/local/bin/
git_sha1="$(git rev-parse HEAD)"
docu_build_date="$(date)"
-if [[ $GERRIT_EVENT_TYPE != "change-merged" ]] ; then
- patchset="/$GERRIT_CHANGE_NUMBER"
+if [[ $JOB_NAME =~ "verify" ]] ; then
+ patchset="/$GERRIT_CHANGE_NUMBER"
fi
-
files=()
while read -r -d ''; do
files+=("$REPLY")
@@ -61,10 +60,10 @@ for img in "${{images[@]}}"; do
# uploading found images
echo "uploading $img"
cat "$img" | gsutil cp -L gsoutput.txt - \
- gs://artifacts.opnfv.org/"$project"/"$img"
+ gs://artifacts.opnfv.org/"$project""$patchset"/"$img"
gsutil setmeta -h "Content-Type:image/jpeg" \
-h "Cache-Control:private, max-age=0, no-transform" \
- gs://artifacts.opnfv.org/"$project"/"$img"
+ gs://artifacts.opnfv.org/"$project""$patchset"/"$img"
cat gsoutput.txt
rm -f gsoutput.txt
@@ -73,7 +72,7 @@ done
if [[ $GERRIT_EVENT_TYPE = "change-merged" ]] ; then
patchset="/$GERRIT_CHANGE_NUMBER"
if [ ! -z "$patchset" ]; then
- gsutil rm gs://artifacts.opnfv.org/"$project""$patchset"/**
+ gsutil rm gs://artifacts.opnfv.org/"$project""$patchset"/** || true
fi
fi