How do i exclude a folder from SVN Repository Checkout?

11,892

Solution 1

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,

Solution 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.

Share:
11,892
chin
Author by

chin

Updated on June 20, 2022

Comments

  • chin
    chin almost 2 years

    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

  • Hoàng Long
    Hoàng Long over 8 years
    The idea is simple but it really helps, thanks a bunch