PR Merge lightweight checkout

22 views
Skip to first unread message

Steven Foster

unread,
Mar 28, 2018, 12:03:22 PM3/28/18
to Jenkins Users
Is there an alternative to a full checkout on the master to determine the merge result of a Jenkinsfile for PR merge builds in a multibranch project? Specifically using github. I'm finding the full checkout seems to strain the whole system when the master needs to check out a large repo ~15 times at once for my build. I understand the need for this behaviour as a default and that mine is an edge case. 

Does github store the merge result in a hidden branch that can be leveraged? Or can Jenkins / the git plugin suites do some kind of double lightweight checkout trickery? Will have to switch to pr-head building for now :(

Laurent Malvert

unread,
Mar 28, 2018, 2:02:55 PM3/28/18
to jenkins...@googlegroups.com
Have you tried the advanced options? There's a flag to request a shallow clone. This reduces the fetch time very significantly.

On Wed, Mar 28, 2018, 18:03 Steven Foster <steven...@gmail.com> wrote:
Is there an alternative to a full checkout on the master to determine the merge result of a Jenkinsfile for PR merge builds in a multibranch project? Specifically using github. I'm finding the full checkout seems to strain the whole system when the master needs to check out a large repo ~15 times at once for my build. I understand the need for this behaviour as a default and that mine is an edge case. 

Does github store the merge result in a hidden branch that can be leveraged? Or can Jenkins / the git plugin suites do some kind of double lightweight checkout trickery? Will have to switch to pr-head building for now :(

--
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/53442155-9a4b-498d-9ffa-8d90a36e33dc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Laurent Malvert

unread,
Mar 28, 2018, 2:05:30 PM3/28/18
to jenkins...@googlegroups.com
Also, using a local clone that will then be used by all builds is much better than contacting a remote repo.

Steven Foster

unread,
Mar 28, 2018, 2:25:28 PM3/28/18
to Jenkins Users
Yep, I'm working towards using the reference repo on the agents for the actual build part. I don't know if I can configure that for the pre-build checkout. The problem is occurring when Jenkins is fetching the Jenkinsfile before the build gets going.
Reply all
Reply to author
Forward
0 new messages