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/requirements/latex/*.pdf "gs://$gs_path_branch/"
38 echo "Document is available at http://$gs_path_branch"
41 if [[ $GERRIT_EVENT_TYPE = "change-merged" ]] ; then
43 echo "Clean Out-of-dated Documents"
44 echo "----------------------------"
46 gsutil rm -r "gs://$gs_path_review" || true