[workflow-plugin] What is the best way to add '--recursive' to 'git' statements

194 views
Skip to first unread message

Vizionz

unread,
Apr 21, 2015, 10:25:15 PM4/21/15
to jenkins...@googlegroups.com
Hello,

Is it possible to add '--recursive' parameter to the workflow git statement?

git branch: "${GitBranch}", changelog: true, poll: false, url: "${GitRepo}"

This statement does not pull submodules when executed.



High Regards,
Jc

Tim Wojtaszek

unread,
Apr 23, 2015, 11:43:10 AM4/23/15
to jenkins...@googlegroups.com
I'd recommend trying to do this using the Snippet Generator, General SCM, Git ...  make sure you are on workflow 1.4 at least.

It will help you put together something like this, taking advantage of all the extensions available.  I'm thinking what you really want is the ' doGenerateSubmoduleConfigurations: true" part.

checkout([$class: 'GitSCM', branches: [[name: 'master']], doGenerateSubmoduleConfigurations: true, extensions: [[$class: 'WipeWorkspace'], [$class: 'SparseCheckoutPaths', sparseCheckoutPaths: [[path: 'build']]]], userRemoteConfigs: [[credentialsId: 'secretc', url: 'g...@github.com:sample/sample.git']]])

Cheers,
tim
Reply all
Reply to author
Forward
0 new messages