5 export PATH=$PATH:/usr/local/bin/
19 # NOTE: make sure source parameters for GS paths are not empty.
20 [[ $GERRIT_CHANGE_NUMBER =~ .+ ]]
21 [[ $GERRIT_PROJECT =~ .+ ]]
22 [[ $GERRIT_BRANCH =~ .+ ]]
24 gs_path_review="artifacts.opnfv.org/review/$GERRIT_CHANGE_NUMBER"
25 if [[ $GERRIT_BRANCH = "master" ]] ; then
26 gs_path_branch="artifacts.opnfv.org/$GERRIT_PROJECT"
28 gs_path_branch="artifacts.opnfv.org/$GERRIT_PROJECT/${{GERRIT_BRANCH##*/}}"
31 if [[ $JOB_NAME =~ "verify" ]] ; then
32 gsutil cp -r build/* "gs://$gs_path_review/"
34 echo "Document is available at http://$gs_path_review"
36 gsutil cp -r build/design_docs "gs://$gs_path_branch/"
37 gsutil cp -r build/requirements/html "gs://$gs_path_branch/"
38 gsutil cp -r build/requirements/latex/*.pdf "gs://$gs_path_branch/"
40 echo "Latest document is available at http://$gs_path_branch"
42 if gsutil ls "gs://$gs_path_review" > /dev/null 2>&1 ; then
44 echo "Deleting Out-of-dated Documents..."
45 gsutil rm -r "gs://$gs_path_review"