Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do i exclude a folder from SVN Repository Checkout?

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

like image 423
chin Avatar asked Nov 11 '11 07:11

chin


People also ask

How do I ignore a folder in svn?

Set the svn:ignore property of the parent directory: svn propset svn:ignore dirname . If you have multiple things to ignore, separate by newlines in the property value.

How remove checked out folder from svn?

Just delete your complete local checked-out working copy (including all . svn directories). This will not modify your repository as you are not committing your deletion.

How do I ignore target folder in svn?

To ignore files in subversion you want to set the svn:ignore property. You can see more here http://svnbook.red-bean.com/en/1.8/svn.advanced.props.special.ignore.html about half way down. svn propset svn:ignore target .


2 Answers

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,

like image 191
user2408807 Avatar answered Oct 03 '22 19:10

user2408807


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.

like image 24
estani Avatar answered Oct 02 '22 19:10

estani