summaryrefslogtreecommitdiffstats
path: root/jjb
diff options
context:
space:
mode:
authorRyota MIBU <r-mibu@cq.jp.nec.com>2015-11-20 22:25:09 +0900
committerRyota MIBU <r-mibu@cq.jp.nec.com>2015-11-23 22:17:31 +0900
commitc9a4390efe9b77bd3e9eafe5d8a88641d0758ae3 (patch)
tree2e414bff1e7d46ee7b5b7e4eaf0e22f37a45a0c8 /jjb
parentb58d2f1aec9ab6a00b4c2a63017874126f636a4c (diff)
use gsutil m option to improve performance
Change-Id: Ic76d5f0817208e923c60e8e24e531d5a761470f4 Signed-off-by: Ryota MIBU <r-mibu@cq.jp.nec.com>
Diffstat (limited to 'jjb')
-rw-r--r--jjb/releng-macros.yaml24
1 files changed, 11 insertions, 13 deletions
diff --git a/jjb/releng-macros.yaml b/jjb/releng-macros.yaml
index 1c79144a1..9e482dca3 100644
--- a/jjb/releng-macros.yaml
+++ b/jjb/releng-macros.yaml
@@ -201,15 +201,14 @@
gs_path="artifacts.opnfv.org/review/$GERRIT_CHANGE_NUMBER"
- gsutil cp -r docs/output/* "gs://$gs_path"
+ gsutil -m cp -r docs/output/* "gs://$gs_path"
- gsutil ls "gs://$gs_path" | grep -e 'html$' | while read file
- do
- gsutil setmeta \
+ if gsutil ls "gs://$gs_path" | grep -e 'html$' > /dev/null 2>&1 ; then
+ gsutil -m setmeta \
-h "Content-Type:text/html" \
-h "Cache-Control:private, max-age=0, no-transform" \
- "$file"
- done
+ "gs://$gs_path"/**.html
+ fi
gerrit_comment="Document link(s):
$(gsutil ls "gs://$gs_path" | grep -e 'index.html$' -e 'pdf$' | sed 's/^gs/http/')"
@@ -240,15 +239,14 @@
gs_path="artifacts.opnfv.org/{project}/{branch}/docs"
fi
- gsutil cp -r docs/output/* "gs://$gs_path"
+ gsutil -m cp -r docs/output/* "gs://$gs_path"
- gsutil ls "gs://$gs_path" | grep -e 'html$' | while read file
- do
- gsutil setmeta \
+ if gsutil ls "gs://$gs_path" | grep -e 'html$' > /dev/null 2>&1 ; then
+ gsutil -m setmeta \
-h "Content-Type:text/html" \
-h "Cache-Control:private, max-age=0, no-transform" \
- "$file"
- done
+ "gs://$gs_path"/**.html
+ fi
gerrit_comment="Document link(s):
$(gsutil ls "gs://$gs_path" | grep -e 'index.html$' -e 'pdf$' | sed 's/^gs/http/')"
@@ -271,5 +269,5 @@
if gsutil ls "gs://$gs_path" > /dev/null 2>&1 ; then
echo
echo "Deleting Out-of-dated Documents..."
- gsutil rm -r "gs://$gs_path_review"
+ gsutil -m rm -r "gs://$gs_path_review"
fi