On Wed, May 24, 2017 at 9:01 AM Mark Allison <[email protected]> wrote:

> On Wednesday, 24 May 2017 13:29:58 UTC+1, Daniel Beck wrote:
>
>>
>> > On 24. May 2017, at 09:23, Mark Allison <[email protected]> wrote:
>> >
>> > I know I probably need to use sparse and/or shallow checkouts, but
>> can't seem to work out how to configure that in a Jenkins pipeline script
>> with the git plugin. Any ideas?
>>
>> Use the 'checkout' step and specify Git SCM. That should allow you to use
>> all the options available in Git. Use the snippet generator for this.
>>
>> Daniel, how does that show checking out a directory within a repo? Do you
> have something more concrete? The snippet generator does not show this.
>

Checking out to a subdirectory within a workspace requires that you nest
the checkout() step inside a dir("subdir-name") step.  The snippet
generator only shows one at a time (as far as I recall), so it won't show
you that combination.

Refer to
https://github.com/MarkEWaite/jenkins-bugs/blob/JENKINS-43052/Jenkinsfile for
an example of that technique.

Mark Waite


>
>
> --
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/56b64b99-70dc-4e38-9a6a-6ba29e28aa1a%40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-users/56b64b99-70dc-4e38-9a6a-6ba29e28aa1a%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> 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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtFs%2B%3D9OuaLdjqX9w3Rbez3-DBN_yCFWEwLQ%2Bdz5dNUnyg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to