diff options
author | Christophe Lyon <christophe.lyon@linaro.org> | 2018-05-16 22:18:54 +0000 |
---|---|---|
committer | Christophe Lyon <christophe.lyon@linaro.org> | 2018-05-16 22:18:54 +0000 |
commit | e3dda252ee9a4547049f8986747e282e37a58bce (patch) | |
tree | 3f80e9a9a5de66e91c8027294c54f42a1bf93e08 /jenkins.sh | |
parent | 8b55785212ea1875e24af7a7766fefcbf97f0aa0 (diff) |
jenkins.sh: Handle the case were we have nothing to upload to logserver.
If the build was already performed, we have nothing to upload to
logserver, so make sure the EXIT handler does not fail in such a case.
Change-Id: I3885ed08fcfe5204b5549eca0a9aa943d879fb0b
Diffstat (limited to 'jenkins.sh')
-rwxr-xr-x | jenkins.sh | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -108,7 +108,9 @@ upload_to_logserver() exit_handler() { - upload_to_logserver + if $something_to_upload; then + upload_to_logserver + fi if $clean_lock_on_exit; then ssh $logopts $logserver rm -f $basedir/$dir.lock fi @@ -178,6 +180,10 @@ rebuild=true # Whether to remove locks upon exit clean_lock_on_exit=false +# Whether we have some logs to upload. False if we didn't build +# anything because the build was already performed. +something_to_upload=true + orig_parameters="$@" OPTS="$(getopt -o s:g:w:o:l:rt:b:h -l override:,gcc-branch:,snapshots:,gitrepo:,abedir:,workspace:,options:,logserver:,logname:,languages:,runtests,target:,testcontainer:,bootstrap,help,excludecheck:,norebuild,extraconfig:,send-results-to: -- "$@")" @@ -254,6 +260,7 @@ while [ x"$logserver" != x"" ]; do 0) echo "Logs are already present in $logserver:$logport:$basedir/$dir" if ! $rebuild; then + something_to_upload=false exit 0 fi echo "But we are asked to rebuild them anyway" |