We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8fa7d95 commit f32f0d3Copy full SHA for f32f0d3
vars/checkout_repo.groovy
@@ -188,6 +188,20 @@ void checkout_repo(BranchInfo info) {
188
error("Invalid repo: ${info.repo}")
189
}
190
191
+ echo 'Clone all remaining submodules without dedicated handlers'
192
+ sh '''
193
+# Initialize submodule variables (required by `git submodule status`)
194
+git submodule init
195
+git submodule foreach 'git submodule init'
196
+
197
+# Only split unquoted expansions on newlines
198
+IFS='
199
+'
200
+for module in $(git submodule status --recursive | sed -n 's/^-[^ ]* //p'); do
201
+ git -C "$module" submodule update --recursive --init --depth=1 .
202
+done
203
+'''
204
205
stash name: stashName, includes: '**/*', useDefaultExcludes: false
206
info.stash = stashName
207
needUnstash = false
0 commit comments