Reputation: 19699
I have cases where when doing a full checkout (e.g. in Jenkins) the checkout may hang on some location and after a long time, an hour or so, the checkout fails due to malformed network data. This is kind of a problem when trying to automate things ;)
Is it possible in Subversion to make Jenkins or whoever is using the Subversion cilent, to timeout e.g. after 5 minutes, clean the SVN, and retry the checkout? I guess I could make a script of my own, but somehow I need to be able to retry checkout if it has hanged. Thanks.
Upvotes: 2
Views: 2157
Reputation: 1282
I have also been confronted to this issue.
To re-check-out the Project I am using the Retry build after failure entry from the navigator plugin.
As I just want the Build to react on the check-out problem I have activated the Only rerun build if regular expression is found in output with something like "Caused by: java.nio.file.FileSystemException" (Please have a look at your log to find out which phrase is good for you).
Maximum number of successive failed builds may be set to 1
Delay before retrying build may be set to 120 (in seconds)
For cleaning the repository, I think that the Always check out a fresh copy from your Source-Code-Mangement configuration should a the best way.
Regards.
Upvotes: 1
Reputation: 859
Make a script! Use tools for the hard stuff.
retry: https://github.com/kadwanev/retry
timeout: http://manpages.courier-mta.org/htmlman1/timeout.1.html
Example
retry timeout 3 ping google.com
So just make a script to clean the destination, and download from svn. The tools will timeout if it takes too long, and retrying your script will clean and retry as long as you want.
Upvotes: 1