7

I have 20 directories under trunk

/trunk/a1
/trunk/a2
/trun/a3
..
..
/trunk/a20

How to exclude (not include) some (arbitrary directories during Jenkins checkout. For example, I want to have all the directories under trunk except /trunk/a3/b1 How to do this?

I already found an answer in SVN checkout ignore folder but this is not possible under Jenkins. Need a much simpler solution where I don't know the number of directories under trunk except the one I want to exclude.

Also how to add a custom svn checkout.Let's say I want to execute svn command line tool to do the checkout?

Community
  • 1
  • 1
Sriwantha Attanayake
  • 7,694
  • 5
  • 42
  • 44
  • Why do you want to exclude it? Dose it take too much to check out? Or too much space? The reason I'm asking is that depending on the reason you may be better off checking it out and then deleting it. – – malenkiy_scot Apr 25 '12 at 20:00
  • The reason being the directory being checked out has pre build libraries that takes ages to build. If we set the checkout strategy to "Emulate checkout by first deleting unversioned/ignored files then 'svn' update", the svn checkout will delete the files library folder, because .lib and .obj files are set as files to be ignored (this setting we have to maintain so that developers commit only source files but not .lib or .obj files). I want to run "Emulate checkout by first deleting unversioned/ignored files" except one folder. – Sriwantha Attanayake Apr 26 '12 at 08:27
  • 1
    @SriwanthaAttanayake: I personally recommend putting the binaries completely outside the checkout. Depends on your build system, but I've been using it with make (using `VPATH`), autoconf (`cd build; ../src/configure`) and cmake (`cd build; cmake ../src`). With msbuild it should be possible too by defining the `IntDir` and `OutDir` on command-line. Not sure about other kinds of IDEs, but I tend to prefer generating project files with cmake now (well, the project I work on is build on several wildly different platforms so it was the only viable option anyway). – Jan Hudec Jul 15 '14 at 14:22

2 Answers2

2

I know that's much to late, but maybe this can be useful: https://issues.jenkins-ci.org/browse/JENKINS-25273

Important: This version contains quick and dirty fixes! In our tests it was stable without errors but to avoid problems save the Jenkins environment before testing it.

Install: Just delete the subversion folder and files in your Jenkins - plugin folder and replace them with the subversion.hpi file from the ticket. You have to create also an empty file named subversion.hpi.pinned in your plugin folder to provide that the new plugin wont be overwritten by the original one.

Darthmail
  • 169
  • 1
  • 12
0

Since you do update (and not complete checkout) you can do the following: after the initial checkout go to the directory you want to ignore and do svn up --set-depth=empty. The subsequent updates won't update the directory.

malenkiy_scot
  • 16,415
  • 6
  • 64
  • 87
  • Are you sure Jenkins will actually honour the setting? It uses it's own subversion library, which is additionally pretty ancient most of the time (svn 1.9 is about to be released, but Jenkins can still only create 1.7 checkouts—which additionally means you have to keep `svn` 1.7 around to set the option). – Jan Hudec Jul 15 '14 at 14:15