Multibranch checkout for jenkinsfile

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

Multibranch checkout for jenkinsfile

Gilad Baruchian
Hi,
I have a Jenkinsfile located in <my svn branch>\build folder, and it checks out code to the slave node and builds.
My multi branch project finds the branch correctly, but it checks out the entire svn branch on the master just to read the jenkinsfile instead of checking out just the jenkinsfile itself of just <my svn branch>\build folder.


This is a major problem because of storage and performance, are there any solutions for that? 

--
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/d3bcfa9b-76ce-419a-b6ee-ebf4284d1a5c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Multibranch checkout for jenkinsfile

stephenconnolly
Somebody needs to implement SCMFileSystem for the Subversion plugin. In principle should not be too hard to do. The code is currently using the "old-style" https://github.com/jenkinsci/subversion-plugin/blob/master/src/main/java/jenkins/scm/impl/subversion/SubversionSCMSource.java#L403-L405 so it doesn't need the checkout to test if the branch has a Jenkinsfile, but it currently needs the checkout to read the Jenkinsfile.


I don't have the time to do that, I suspect you may get further scratching your own itch. I am happy to review and provide advice if you want to give it a shot. Should be somewhere between 2h and 2d effort depending on your skill level and familiarity with Java (not too much Jenkins idioms required for this functionality, other than putting @Extension on your SCMFileSystem.Builder class - which, unlike my gitea example, can work for both SubversionSCM and SubversionSCMSource)

On 9 October 2017 at 00:24, Gilad Baruchian <[hidden email]> wrote:
Hi,
I have a Jenkinsfile located in <my svn branch>\build folder, and it checks out code to the slave node and builds.
My multi branch project finds the branch correctly, but it checks out the entire svn branch on the master just to read the jenkinsfile instead of checking out just the jenkinsfile itself of just <my svn branch>\build folder.


This is a major problem because of storage and performance, are there any solutions for that? 

--
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/d3bcfa9b-76ce-419a-b6ee-ebf4284d1a5c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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/CA%2BnPnMz%3DT4WRUp3UUSaFz3dgXdjbYSO_bEGfx62eePhMM78Dtw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

RE: Multibranch checkout for jenkinsfile

David Aldrich-2

If I may comment on this, I think the main issue is that there is currently no maintainer for the svn plugin.  So, even if someone was able to make the changes Stephen suggested, they may not be released.

 

It’s quite a problem for some of us that Subversion is no longer well supported in Jenkins.

 

Best regards

 

David

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Stephen Connolly
Sent: 09 October 2017 10:08
To: [hidden email]
Subject: Re: Multibranch checkout for jenkinsfile

 

Somebody needs to implement SCMFileSystem for the Subversion plugin. In principle should not be too hard to do. The code is currently using the "old-style" https://github.com/jenkinsci/subversion-plugin/blob/master/src/main/java/jenkins/scm/impl/subversion/SubversionSCMSource.java#L403-L405 so it doesn't need the checkout to test if the branch has a Jenkinsfile, but it currently needs the checkout to read the Jenkinsfile.

 

 

I don't have the time to do that, I suspect you may get further scratching your own itch. I am happy to review and provide advice if you want to give it a shot. Should be somewhere between 2h and 2d effort depending on your skill level and familiarity with Java (not too much Jenkins idioms required for this functionality, other than putting @Extension on your SCMFileSystem.Builder class - which, unlike my gitea example, can work for both SubversionSCM and SubversionSCMSource)

 

On 9 October 2017 at 00:24, Gilad Baruchian <[hidden email]> wrote:

Hi,

I have a Jenkinsfile located in <my svn branch>\build folder, and it checks out code to the slave node and builds.

My multi branch project finds the branch correctly, but it checks out the entire svn branch on the master just to read the jenkinsfile instead of checking out just the jenkinsfile itself of just <my svn branch>\build folder.

 

 

This is a major problem because of storage and performance, are there any solutions for that? 

--
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/d3bcfa9b-76ce-419a-b6ee-ebf4284d1a5c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

 

--
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/CA%2BnPnMz%3DT4WRUp3UUSaFz3dgXdjbYSO_bEGfx62eePhMM78Dtw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Click <a href="https://www.mailcontrol.com/sr/Psc5z&#43;uFjL!GX2PQPOmvUlvAwUAcTfZnp6uPgdaA&#43;mVCKteJmbKvbGuINXwrOZN9BCM4TF6orHgKghm6!2a&#43;jw=="> here to report this email as spam.

--
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/0e5d8c4dcf3f4acc87f70491a987c97b%40EUX13SRV1.EU.NEC.COM.
For more options, visit https://groups.google.com/d/optout.