Print out items in sparse item list if the list is not empty
This commit is contained in:
parent
b18dba3c00
commit
4c4958db9b
1 changed files with 4 additions and 3 deletions
|
|
@ -94,10 +94,11 @@ def gitCheckout(String gitURL, String revision, String targetDir, String repoRoo
|
|||
checkgitlfsinstall()
|
||||
def reporootpath = checkouttoreporoot(gitURL)
|
||||
if (!sparseitemlist.isEmpty()) {
|
||||
echo "Items in sparse item list: "
|
||||
def itemstring = "Items in sparse item list:\n"
|
||||
for (item in sparseitemlist) {
|
||||
echo item
|
||||
itemstring += item + "\n"
|
||||
}
|
||||
echo itemstring
|
||||
}
|
||||
checkout([
|
||||
$class: 'GitSCM',
|
||||
|
|
@ -114,7 +115,7 @@ def gitCheckout(String gitURL, String revision, String targetDir, String repoRoo
|
|||
[$class: 'CloneOption', depth: cloneDepth, noTags: false, reference: reporootpath, shallow: shallowClone, timeout: 120],
|
||||
[$class: 'CheckoutOption', timeout: 120],
|
||||
[$class: 'RelativeTargetDirectory', relativeTargetDir: targetDir],
|
||||
sparsecheckoutconfig(sparseitemlist)
|
||||
[$class: 'SparseCheckoutPaths', sparseCheckoutPaths: sparsecheckoutconfig(sparseitemlist)],
|
||||
],
|
||||
submoduleCfg: [],
|
||||
])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue