summaryrefslogtreecommitdiffstats
path: root/jjb
diff options
context:
space:
mode:
authorRyota MIBU <r-mibu@cq.jp.nec.com>2015-11-26 21:26:23 +0900
committerRyota MIBU <r-mibu@cq.jp.nec.com>2015-11-26 21:26:23 +0900
commitfb1827faf5a431a896cded2dce945651a0e84aed (patch)
treed3b6e4c7a8562bd15c49b212ca775760ab11f4de /jjb
parentd71ea5fba2ad0ff933d9e8301953e5205c851bf4 (diff)
jjb: fix dirs to upload gs in doc builder jobs
Change-Id: I0a1e899179ad0ab5b5b662bee6214487e84e1fe7 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, 15 insertions, 9 deletions
diff --git a/jjb/releng-macros.yaml b/jjb/releng-macros.yaml
index 1f091b973..9848eeda8 100644
--- a/jjb/releng-macros.yaml
+++ b/jjb/releng-macros.yaml
@@ -227,9 +227,12 @@
echo "###########################"
echo
- gs_path="artifacts.opnfv.org/review/$GERRIT_CHANGE_NUMBER"
+ gs_base="artifacts.opnfv.org/review"
+ gs_path="$gs_base/$GERRIT_CHANGE_NUMBER"
+ local_path="docs/$GERRIT_CHANGE_NUMBER"
- gsutil -m cp -r docs/output "gs://$gs_path"
+ mv docs/output "$local_path"
+ gsutil -m cp -r "$local_path" "gs://$gs_base"
if gsutil ls "gs://$gs_path" | grep -e 'html$' > /dev/null 2>&1 ; then
gsutil -m setmeta \
@@ -239,8 +242,8 @@
fi
echo "Document link(s):" >> gerrit_comment.txt
- find docs/output | grep -e 'index.html$' -e 'pdf$' | \
- sed -e "s|^docs/output| http://$gs_path|" >> gerrit_comment.txt
+ find "$local_path" | grep -e 'index.html$' -e 'pdf$' | \
+ sed -e "s|^$local_path| http://$gs_path|" >> gerrit_comment.txt
- builder:
name: upload-merged-docs-to-opnfv-artifacts
@@ -259,12 +262,15 @@
echo
if [[ "$GERRIT_BRANCH" == "master" ]] ; then
- gs_path="artifacts.opnfv.org/$GERRIT_PROJECT/docs"
+ gs_base="artifacts.opnfv.org/$GERRIT_PROJECT"
else
- gs_path="artifacts.opnfv.org/$GERRIT_PROJECT/$GERRIT_BRANCH/docs"
+ gs_base="artifacts.opnfv.org/$GERRIT_PROJECT/$GERRIT_BRANCH"
fi
+ gs_path="$gs_base/docs"
+ local_path="docs/docs"
- gsutil -m cp -r docs/output/* "gs://$gs_path"
+ mv docs/output "$local_path"
+ gsutil -m cp -r "$local_path" "gs://$gs_base"
if gsutil ls "gs://$gs_path" | grep -e 'html$' > /dev/null 2>&1 ; then
gsutil -m setmeta \
@@ -274,8 +280,8 @@
fi
echo "Document link(s):" >> gerrit_comment.txt
- find docs/output | grep -e 'index.html$' -e 'pdf$' | \
- sed -e "s|^docs/output| http://$gs_path|" >> gerrit_comment.txt
+ find "$local_path" | grep -e 'index.html$' -e 'pdf$' | \
+ sed -e "s|^$local_path| http://$gs_path|" >> gerrit_comment.txt
- builder:
name: report-docs-build-result-to-gerrit