Svn – Jenkins SVN checkout borks new files

corruptionJenkinssvn

I am running a Jenkins CI server which polls an SVN server and checks out the (Maven) project and builds it.

We have recently changed the build server and I set up Jenkins afresh with the few projects we have. Now this new instance has a major problem: Whenever a new file has been committed to the SVN repository, the Jenkins svn update process will corrupt those new files by having their content duplicated. So if one of our developers commits a new file A with this content:

<test>
</test>

then the file will end up in the Jenkins workspace like this:

<test>
</test>
<test>
</test>

Obviously this is very annoying. I can clear up the situation by wiping the workspace, but really, I don't want to do this every time the build fails. I have never had any troubles with SVN and/or Jenkins before.

What could be the reason for such behaviour?

Best Answer

This seems to be a bug with Jenkins: https://issues.jenkins-ci.org/browse/JENKINS-14551

For the time being, you're best way to handle this is to implement a workaround by the means of automatically clearing out the workspace before building. This may however not the way to go if you have huge and frequent merges - but from my understanding, they're working on it.

Related Topic