ExcludedRegions for SVN not working in Pipeline

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

ExcludedRegions for SVN not working in Pipeline

Ven H
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

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAPp28eoPkKPdQ_r%2BaBOvdB2CdEHDJGX%2BuiGDhJhgKNur1yqyOA%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: ExcludedRegions for SVN not working in Pipeline

Ven H
Does anyone have a solution for this?


Regards,
Venkatesh


On Thu, Aug 13, 2020 at 12:00 PM Ven H <[hidden email]> wrote:
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

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAPp28ep_VigjFK-S5yEVYmXSiLWkJAzA96%3DLiUMnZ2g2hMLoAg%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: ExcludedRegions for SVN not working in Pipeline

Ven H
Has anyone faced this? Does anyone have any idea? Please help.

Regards,
Venkatesh


On Fri, Aug 21, 2020 at 12:05 AM Ven H <[hidden email]> wrote:
Does anyone have a solution for this?


Regards,
Venkatesh


On Thu, Aug 13, 2020 at 12:00 PM Ven H <[hidden email]> wrote:
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

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAPp28eqwYzC-%2B9Ms9PbfL2Six7VZ6BwRRyZ_NnsjsiHB3c1-XA%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: ExcludedRegions for SVN not working in Pipeline

Fabi

>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

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/20200824172418.F127141B9BC8%40macserver.private.
Reply | Threaded
Open this post in threaded view
|

Re: ExcludedRegions for SVN not working in Pipeline

Ven H
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


On Mon, Aug 24, 2020 at 10:54 PM Fabian Cenedese <[hidden email]> wrote:

>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

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/20200824172418.F127141B9BC8%40macserver.private.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAPp28er4s7Xvo9eDfxxGou1maXVNPtbj%2B9RKQBjLRZQt22cqzQ%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: ExcludedRegions for SVN not working in Pipeline

Ven H
No one else faced this issue before? Unfortunately, there is no good documentation or blogs or forums for this. 

Regards,
Venkatesh


On Tue, Aug 25, 2020 at 8:54 PM Ven H <[hidden email]> wrote:
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


On Mon, Aug 24, 2020 at 10:54 PM Fabian Cenedese <[hidden email]> wrote:

>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

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/20200824172418.F127141B9BC8%40macserver.private.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAPp28eoceo%2Bu13bGYnVW%2B0_QsQX0__d0qF6eLriZyQzeA%3DKMaA%40mail.gmail.com.