sparse checkout multiple repositories

45 views
Skip to first unread message

Manoj Chander

unread,
Mar 18, 2021, 5:41:46 AM3/18/21
to Jenkins Users


Hi Is it possible to sparse checkout multiple repositories from git .

i want to check out specific folder alone from each project ? 

node('ATLAS && Linux')

{ dir('CalibrationResults')
              { git url: 'https://github.com/AtlasBID/CalibrationResults.git' } 

  dir('Combination') 
                   { git url: 'https://github.com/AtlasBID/Combination.git' } dir('CombinationBuilder') 
                    { git url: 'https://github.com/AtlasBID/CombinationBuilder.git' } sh('ls') sh('. CombinationBuilder/build.sh') }


Regards ,
Manoj 

Mark Waite

unread,
Mar 18, 2021, 8:12:17 AM3/18/21
to Jenkins Users
Yes, it is possible.  You'll need to use the "checkout" step rather than the "git" step.

The documentation for the "git" step (in the online help of your Jenkins installation and on jenkins.io) says:

NOTE: The checkout step is the preferred SCM checkout method. It provides significantly more functionality than the git step.

The checkout step can be used in many cases where the git step cannot be used. Refer to the git plugin documentation for detailed descriptions of options available to the checkout step. For example, the git step does not support:

  • SHA-1 checkout
  • Tag checkout
  • Submodule checkout
  • Sparse checkout

--
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/f5d19580-ef4b-45a2-87aa-3d1101f84ce1n%40googlegroups.com.

Manoj Chander

unread,
Apr 15, 2021, 12:00:42 AM4/15/21
to jenkins...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages