Retry uploads on failure

Fix for [JENKINS-23338](https://issues.jenkins-ci.org/browse/JENKINS-23338)

The upload will retry 5 times and wait 5 seconds between each try on
failures.