8

How do i exclude Jenkins CI to exclude a folder from SVN checkout?

I tried the "Exclude Regions" but is not working, am i doing it the correct way?

Screenshot of my setting on Jenkins: Jenkins Settings

lightswitch05
  • 9,058
  • 7
  • 52
  • 75
chin
  • 111
  • 1
  • 2
  • 7
  • gives 403 forbidden on your given link – Yusuf K. Nov 11 '11 at 08:44
  • I get a 403 Error on clicking the link... Have you tried clicking on the help Button next to the Exclude Regions input field? The help text is quite informative... – pushy Nov 11 '11 at 08:46
  • Pushy, yup tried the help, and tried adding few text on it. but no luck – chin Nov 11 '11 at 09:20
  • Ok, excluding .svn won't work, svn needs this dir to work. In any way, I don't think "Exclude Regions" is what you need. This option will only restrict the folders that are queried for changes. That means, that the build would not start if there were any changes to any file in /trunk/myfolder, but if there were any other changes and the job was started, the files in /trunk/myfolder would still be checked out. – pushy Nov 11 '11 at 09:41
  • possible duplicate of [SVN checkout ignore folder](http://stackoverflow.com/questions/192824/svn-checkout-ignore-folder) – mloskot Dec 03 '11 at 15:22
  • possible duplicate of [How to ignore a directory with SVN?](http://stackoverflow.com/questions/116074/how-to-ignore-a-directory-with-svn) – bahrep May 22 '13 at 09:49

4 Answers4

5

I too was looking for a solution for the same. The only one I could find was to instead add each folder under your repo (i.e, trunk/source, trunk/docs ..etc) as a different Module (Repository url) using the "Add more locations" option.

Jenkins will then check for updates to all these folders before triggerign a build.

Obviously this option helps if you have less number of folders under your project trunk.

Cheers,

user2408807
  • 51
  • 1
  • 2
2

Excluded regions are excluded from triggering builds, not from checkout (e.g. you might not want to trigger a build just because the documentation changed)

If set, and Jenkins is set to poll for changes, Jenkins will ignore any files and/or folders in this list when determining if a build needs to be triggered.

afaict you can't do that directly in jenkins (still). But you might use multiple modules now so you could use a whitelisting:

url: http://svn/root/project/trunk
repository depth: files

url: http://svn/root/project/trunk/dirA
repository depth: infinity

url: http://svn/root/project/trunk/dirB
repository depth: infinity

url: http://svn/root/project/trunk/dirC
repository depth: infinity

Which will skip all directories that are not dirA, dirB or dirC and will include all files from the the root project.

estani
  • 24,254
  • 2
  • 93
  • 76
0

Its name may say that it excludes some files from the checkout, but read the help : It's the list of file which will not trigger the auto build of the project it there is a new version on SVN

Sébastien Coste
  • 309
  • 2
  • 11
0

I think your are looking for an SVN command to ignoring some paths when export.

You may be check this answer

Community
  • 1
  • 1
Yusuf K.
  • 4,195
  • 1
  • 33
  • 69