Merge "Need to have reviews under /$PROJECT/$review_number"
authorRyota Mibu <r-mibu@cq.jp.nec.com>
Sun, 7 Feb 2016 06:45:24 +0000 (06:45 +0000)
committerGerrit Code Review <gerrit@172.30.200.206>
Sun, 7 Feb 2016 06:45:24 +0000 (06:45 +0000)
jjb/releng-macros.yaml

index 5d95707..b43a76d 100644 (file)
             echo "###########################"
             echo
 
-            gs_base="artifacts.opnfv.org/review"
+            gs_base="artifacts.opnfv.org/$PROJECT/review"
             gs_path="$gs_base/$GERRIT_CHANGE_NUMBER"
             local_path="upload/$GERRIT_CHANGE_NUMBER"
 
 
             [[ $GERRIT_CHANGE_NUMBER =~ .+ ]]
 
+            gs_path="artifacts.opnfv.org/$PROJECT/review/$GERRIT_CHANGE_NUMBER"
+
+            if gsutil ls "gs://$gs_path" > /dev/null 2>&1 ; then
+                echo
+                echo "Deleting Out-of-dated Documents..."
+                gsutil -m rm -r "gs://$gs_path"
+            fi
             gs_path="artifacts.opnfv.org/review/$GERRIT_CHANGE_NUMBER"
 
             if gsutil ls "gs://$gs_path" > /dev/null 2>&1 ; then