ExcludedRegions for SVN not working in Pipeline

44 views
Skip to first unread message

Ven H

unread,
Aug 13, 2020, 9:38:42 AM8/13/20
to jenkins...@googlegroups.com
Hi,

I have a pipeline which is configured for the SVN path in Jenkins pipeline. https://svn.domain.com/org/project/trunk/Platform/Src

Within Src, I have a Build folder and there are some projects inside that as well. So, I want to exclude some projects within the Build folder. So I put the ExcludedRegions like /Build/ProjectFolder1/.* and so on. But this is not working. Any help will be appreciated.

Regards,
Venkatesh

Ven H

unread,
Aug 20, 2020, 2:36:12 PM8/20/20
to jenkins...@googlegroups.com
Does anyone have a solution for this?


Regards,
Venkatesh

Ven H

unread,
Aug 24, 2020, 12:22:36 PM8/24/20
to jenkins...@googlegroups.com
Has anyone faced this? Does anyone have any idea? Please help.

Regards,
Venkatesh

Fabian Cenedese

unread,
Aug 24, 2020, 1:24:46 PM8/24/20
to jenkins...@googlegroups.com

>I have a pipeline which is configured for the SVN path in Jenkins pipeline. <https://svn.domain.com/org/project/trunk/Platform/Src>https://svn.domain.com/org/project/trunk/Platform/Src
>
>Within Src, I have a Build folder and there are some projects inside that as well. So, I want to exclude some projects within the Build folder. So I put the ExcludedRegions like /Build/ProjectFolder1/.* and so on. But this is not working. Any help will be appreciated.

Depending on the number of projects to include/exclude you could create
a new svn "repository" which just consists of external links to the stuff
you want and checkout that. However depending on your structure
this might not be feasible.

bye Fabi

Ven H

unread,
Aug 25, 2020, 11:25:57 AM8/25/20
to jenkins...@googlegroups.com
Here is some update. I was able to solve this partially. I hope it will help someone in a similar situation. In my Jenkins Script (Scripted, I hope it will work in Declarative approach too), I made the following changes in my checkout step.

checkout([$class: 'SubversionSCM',  excludedRegions: '.*SubFolder1.*', filterChangelog: false, ignoreDirPropChanges: true, locations: [[cancelProcessOnExternalsFail: true, credentialsId: 'MyCredential_ID', depthOption: 'infinity', ignoreExternalsOption: true, local: '.', remote: "${SRC_SVN_URL}"]], quietOperation: true, workspaceUpdater: [$class: 'UpdateUpdater']])

If you carefully observe, it is a very subtle but important format. You have to give it in the format .*FolderName.* . There are no slashes or prefixes other than .* and postfixes other than .* and no need of giving full or relative path, but just the folder name with .* prefix and postfix, that's it. Thanks to the link http://jenkins-ci.361315.n4.nabble.com/Exclude-folder-in-subversion-from-triggering-new-builds-td2993203.html

However, now the challenge is to exclude multiple paths. As per the documentation for ExcludedRegions, every path (folder) should be in a newline. I am not sure how to specify that in the checkout step. I tried various ways, but no luck yet. If someone can please help me, it will be great. 

Regards,
Venkatesh


--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/20200824172418.F127141B9BC8%40macserver.private.

Ven H

unread,
Aug 27, 2020, 12:36:18 PM8/27/20
to jenkins...@googlegroups.com
No one else faced this issue before? Unfortunately, there is no good documentation or blogs or forums for this. 

Regards,
Venkatesh

Reply all
Reply to author
Forward
0 new messages