From fb1827faf5a431a896cded2dce945651a0e84aed Mon Sep 17 00:00:00 2001 From: Ryota MIBU Date: Thu, 26 Nov 2015 21:26:23 +0900 Subject: jjb: fix dirs to upload gs in doc builder jobs Change-Id: I0a1e899179ad0ab5b5b662bee6214487e84e1fe7 Signed-off-by: Ryota MIBU --- jjb/releng-macros.yaml | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) (limited to 'jjb') 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 -- cgit 1.2.3-korg