Multibranch checkout for jenkinsfile

235 views
Skip to first unread message

Gilad Baruchian

unread,
Oct 9, 2017, 3:24:30 AM10/9/17
to Jenkins Users
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? 

Stephen Connolly

unread,
Oct 9, 2017, 5:08:17 AM10/9/17
to jenkins...@googlegroups.com
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)

--
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-users+unsubscribe@googlegroups.com.
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.

David Aldrich

unread,
Oct 9, 2017, 7:07:15 AM10/9/17
to jenkins...@googlegroups.com

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: jenkins...@googlegroups.com [mailto:jenkins...@googlegroups.com] On Behalf Of Stephen Connolly
Sent: 09 October 2017 10:08
To: jenkins...@googlegroups.com
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 <gila...@gmail.com> 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 jenkinsci-use...@googlegroups.com.

 

--

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/CA%2BnPnMz%3DT4WRUp3UUSaFz3dgXdjbYSO_bEGfx62eePhMM78Dtw%40mail.gmail.com.


For more options, visit https://groups.google.com/d/optout.

Click here to report this email as spam.

Reply all
Reply to author
Forward
0 new messages