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")
# 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
done
+if [[ $GERRIT_EVENT_TYPE = "change-merged" ]] ; then
+ patchset="/$GERRIT_CHANGE_NUMBER"
+ if [ ! -z "$patchset" ]; then
+ gsutil rm gs://artifacts.opnfv.org/"$project""$patchset"/** || true
+ fi
+fi
+
echo -e "$links"
+