Print out items in sparse item list if the list is not empty

This commit is contained in:
Dan Hawkins 2019-05-13 21:51:31 +01:00
commit b18dba3c00

View file

@ -93,6 +93,12 @@ def checkgitlfsinstall() {
def gitCheckout(String gitURL, String revision, String targetDir, String repoRootSuffix = "", int cloneDepth = 1, boolean shallowClone = true, ArrayList<String> sparseitemlist = new ArrayList<String>()) {
checkgitlfsinstall()
def reporootpath = checkouttoreporoot(gitURL)
if (!sparseitemlist.isEmpty()) {
echo "Items in sparse item list: "
for (item in sparseitemlist) {
echo item
}
}
checkout([
$class: 'GitSCM',
userRemoteConfigs: [