[JIRA] (JENKINS-58049) GIT SparseCheckout for multiple clones

12 views
Skip to first unread message

godarak@fbd.ie (JIRA)

unread,
Jun 17, 2019, 10:08:03 AM6/17/19
to jenkinsc...@googlegroups.com
Khushboo Godara created an issue
 
Jenkins / Bug JENKINS-58049
GIT SparseCheckout for multiple clones
Issue Type: Bug Bug
Assignee: Mark Waite
Components: git-plugin
Created: 2019-06-17 14:07
Priority: Major Major
Reporter: Khushboo Godara

Hi,

While trying to use sparseCheckout option under jenkins build step or in pipeline script. i am unable to use it for multiple directories checkout. In both instances the path mentioned at the last checks out ignoring the earlier ones. 

This is the code i am using 

checkout(
[
$class: 'GitSCM',
branches: [[name: '*/master']],
doGenerateSubmoduleConfigurations: false,
extensions: [
[$class: 'SparseCheckoutPaths', sparseCheckoutPaths: [[path: 'TIA-Profiles/*'], [path: '${TARGET_ENVIRONMENT}/*']]]
],
submoduleCfg: [],
userRemoteConfigs: [
[
credentialsId: '***********',
url: 'ssh://g...@bitbucket.internal.fbd.ie:7999/rem/properties.git'
]]])

 

It ignores the first path  [path: 'TIA-Profiles/*'] and only checks-out path: '${TARGET_ENVIRONMENT}/*']

Out Repo contitutes of multiple directories and properties files and we don't want to checkout all of it in workspace due security and space constraints. Had tried multiple different ways of doing it but does not works. 

Kindly suggest.

Thanks,

 

 

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

mark.earl.waite@gmail.com (JIRA)

unread,
Jun 17, 2019, 12:57:02 PM6/17/19
to jenkinsc...@googlegroups.com
Mark Waite updated an issue
Change By: Mark Waite
Hi,

While trying to use sparseCheckout option under jenkins build step or in pipeline script. i am unable to use it for multiple directories checkout. In both instances the path mentioned at the last checks out ignoring the earlier ones. 

This is the code i am using 

{noformat} checkout(

[
$class: 'GitSCM',
branches: [[name: '*/master']],
doGenerateSubmoduleConfigurations: false,
extensions: [
[$class: 'SparseCheckoutPaths', sparseCheckoutPaths: [[path: 'TIA-Profiles/*'], [path: '${TARGET_ENVIRONMENT}/*']]]
],
submoduleCfg: [],
userRemoteConfigs: [
[
credentialsId: '***********',
url: 'ssh://g...@bitbucket.internal.fbd.ie:7999/rem/properties.git'
]]])
{noformat}
 

It ignores the first path  [path: 'TIA-Profiles/*'] and only checks-out path: '${TARGET_ENVIRONMENT}/*']

Out Repo contitutes of multiple directories and properties files and we don't want to checkout all of it in workspace due security and space constraints. Had tried multiple different ways of doing it but does not works. 

Kindly suggest.

Thanks,

 

 

mark.earl.waite@gmail.com (JIRA)

unread,
Jun 17, 2019, 12:58:01 PM6/17/19
to jenkinsc...@googlegroups.com
Mark Waite updated Bug JENKINS-58049
 

This is not a bug as far as I can tell. Refer to my jenkins-bugs repo for a working example.

Change By: Mark Waite
Status: Open Fixed but Unreleased
Resolution: Not A Defect

mark.earl.waite@gmail.com (JIRA)

unread,
Jun 17, 2019, 12:59:03 PM6/17/19
to jenkinsc...@googlegroups.com
Mark Waite assigned an issue to Unassigned
Change By: Mark Waite
Assignee: Mark Waite

mark.earl.waite@gmail.com (JIRA)

unread,
Jun 17, 2019, 2:40:02 PM6/17/19
to jenkinsc...@googlegroups.com

mark.earl.waite@gmail.com (JIRA)

unread,
Jun 17, 2019, 2:40:02 PM6/17/19
to jenkinsc...@googlegroups.com
Mark Waite edited a comment on Bug JENKINS-58049
 
Re: GIT SparseCheckout for multiple clones
This is not a bug as far as I can tell.  Refer to [my jenkins-bugs repo|https://github.com/MarkEWaite/jenkins-bugs/blob/JENKINS-58049/Jenkinsfile] for a working example.

I was able to confirm that sparse checkout is not correctly supported by the command line git version that is included with CentOS 6.  CentOS 6 includes command line 1.7.1 which is not supported by the Jenkins git plugin.  There are authentication modes which that old version of command line git does not support and several other features which are not available.  The current version of command line git is 2.22.0.

mark.earl.waite@gmail.com (JIRA)

unread,
Jun 17, 2019, 2:58:02 PM6/17/19
to jenkinsc...@googlegroups.com
Mark Waite edited a comment on Bug JENKINS-58049
This is not a bug as far as I can tell.  Refer to [my jenkins-bugs repo|https://github.com/MarkEWaite/jenkins-bugs/blob/JENKINS-58049/Jenkinsfile] for a working example.

I was able to confirm that sparse checkout is not correctly supported by the command line git version that is included with CentOS 6.  CentOS 6 includes command line 1.7.1 which is not supported by the Jenkins git plugin.  There are authentication modes which that old version of command line git does not support and several other features which are not available.  The current version of command line git is 2.22.0.


Sparse checkout is also not supported by the JGit implementation that is bundled inside the git client plugin.  However, the JGit implementation is not enabled by default.  If it is enabled and a Pipeline job is configured to use it, and the Pipeline job attempts to perform a sparse checkout, then the Pipeline checkout will fail with a message that sparse checkout is not supported by JGit.
Reply all
Reply to author
Forward
0 new messages