Search code examples
jenkinssvnjenkins-pipeline

Jenkins is not overwriting files on checkout


I have a Jenkins build which checks out files to a directory and then builds a project. Let's say one of the files getting checked out is "data.csv". The build process uses this file.

We've now added a step in the build process, which takes the file data.csv, and modifies it as part of the build process (in some scenarios).

The issue that I'm seeing now, is that the checkout step does not overwrite this file when you run the build a second time. Shouldn't Jenkins basically pull all the files that are not the same as in source control?

There is a stage: checkout scm

Which seems to work the rest of the time. i.e. if I update a file in source control, the next time the build runs, it gets pulled down.


Solution

  • Figured it out. It has to do with the “checkout strategy” I had it at “use update as much as possible”. There is another option, which is update as much as possible, with svn revert first.