Check out the snippet for git: checkout and try the sparse checkout
advanced option
checkout changelog: false, poll: false, scm: [
$class: 'GitSCM',
branches: [[name: '*/master']],
doGenerateSubmoduleConfigurations: false,
extensions: [
[
$class: 'SparseCheckoutPaths',
sparseCheckoutPaths: [[path: '/my/path']]
]
],
submoduleCfg: [],
userRemoteConfigs: [[url: 'ssh://[email protected]:x/11346/myrepo.git']]]
El miércoles, 24 de mayo de 2017, 2:23:31 (UTC-5), Mark Allison escribió:
>
> Hi,
>
> I have a large repo in GitHub Enterprise and need to clone a sub-directory
> from it on my Jenkins build server and just build that sub-directory. I am
> using a pipeline script and have this right now:
>
> node {
> stage ('checkout') {
> git url: '[email protected]:Org/MyLargeRepo.git'
> }
> }
>
> What I want is to clone from
> github.devops.mycompany.local:Org/MyLargeRepo/path/to/subproject
>
> 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?
>
--
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/de3a19e6-3679-430c-a5ab-8849b84f78bb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.