diff options
author | Fatih Degirmenci <fatih.degirmenci@ericsson.com> | 2015-07-08 07:11:09 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@172.30.200.206> | 2015-07-08 07:11:09 +0000 |
commit | ef1787f6d1801bdcc4d8a5df04c6779e9ab83bc0 (patch) | |
tree | c2bd41114a0c03a512a41532b44e54c21b59cb3f | |
parent | 83319bc4562067db0185ff867725e0ec5b802652 (diff) | |
parent | 5c533e899b07a938eb85090f1a299ddc4b5e9128 (diff) |
Merge "[doctor] make sure jenkins deletes old files"
-rw-r--r-- | jjb/doctor/docu-build.sh | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/jjb/doctor/docu-build.sh b/jjb/doctor/docu-build.sh index 61613453f..ffb131114 100644 --- a/jjb/doctor/docu-build.sh +++ b/jjb/doctor/docu-build.sh @@ -37,13 +37,11 @@ else gsutil cp -r build/requirements/html "gs://$gs_path_branch/" gsutil cp -r build/requirements/latex/*.pdf "gs://$gs_path_branch/" echo - echo "Document is available at http://$gs_path_branch" -fi + echo "Latest document is available at http://$gs_path_branch" -if [[ $GERRIT_EVENT_TYPE = "change-merged" ]] ; then - echo - echo "Clean Out-of-dated Documents" - echo "----------------------------" - echo - gsutil rm -r "gs://$gs_path_review" || true + if gsutil ls "gs://$gs_path_review" > /dev/null 2>&1 ; then + echo + echo "Deleting Out-of-dated Documents..." + gsutil rm -r "gs://$gs_path_review" + fi fi |