Reputation: 2074
I have a job in which the developer changes a file and checks back in in SVN. As soon as the developer checks in the file, Jenkins has to trigger a build and copy that changed file (not entire directory) from SVN to a target server.
For example, a developer checked in a file in trunk in SVN. Trunk contains a huge number of files, but Jenkins needs to copy only the changed file from the SVN trunk folder to a target server.
How this can be achieved? Is there a plugin or functionality that helps support this feature?
Upvotes: 2
Views: 6229
Reputation: 27485
Maybe you can setup another folder in SVN which will have svn externals link to that one file, and then check out that 1 folder.
As for deploying that to the server, that's up to you how you do that (plugins, scripts, whatever)
Upvotes: 0
Reputation: 28144
You cannot check out a single file from Subversion. The smallest unit you can check out is a directory.
If you already have a working copy, an svn update
will pull the differences.
You can use svn export
or svn cat
to extract a single file from the repository, but it will not have a connection back to the repository when you're finished (unlike a working copy).
Upvotes: 3