On Wed 31 May 2017 at 16:32, Mark Allison <markalli...@gmail.com> wrote:

>
>>
>> On Wed, May 24, 2017 at 9:01 AM Mark Allison <marka...@gmail.com> wrote:
>>
>>> On Wednesday, 24 May 2017 13:29:58 UTC+1, Daniel Beck wrote:
>>>
>>>>
>>>> > On 24. May 2017, at 09:23, Mark Allison <marka...@gmail.com> 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.
>>
>
> Hi Mark,
>
> I am trying to checkout FROM a remote subdirectory within a repo not to a
> subdirectory. Does anyone know how to do that with the git plugin?
>

Git doesn't really do that.

I'd probably see if there is a command from the CLI that does what you want
and then just use a `sh` step to do that

(I'm betting there is no such CLI command BTW)

-- 
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/c90805be-fae3-4f26-bc85-c9e8c1f45e29%40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-users/c90805be-fae3-4f26-bc85-c9e8c1f45e29%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
-- 
Sent from my phone

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CA%2BnPnMycSfKNpTTTPNnNxF_xevZwb%3DEfRc7QMMspXB8gN_epLQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to