MCS-425 - Perform a sparse checkout of items to import from a release repo
This commit is contained in:
parent
907a0f00e6
commit
a32fbee67b
3 changed files with 14 additions and 14 deletions
|
|
@ -81,7 +81,7 @@ def artifactimportfromrepo(meta, String repo, String revision, String destpath,
|
|||
def rootrevision = revision.trim()
|
||||
echo "Cloning root release repo: ${rooturl}, revision: ${rootrevision} at folder: ${destpath}"
|
||||
|
||||
def ArrayList<String> sparseitemlist = gh.convertstringitemstopublish(filter)
|
||||
def ArrayList<String> sparseitemlist = gh.convertSparseItemsString(filter)
|
||||
gh.gitCheckoutAlt(rooturl, rootrevision, destpath, "", 1, true, sparseitemlist)
|
||||
|
||||
def importedmeta = meta.importrelated(destpath)
|
||||
|
|
|
|||
|
|
@ -148,19 +148,6 @@ def convertitemstopublish(String itemstopublishstring) {
|
|||
return paths
|
||||
}
|
||||
|
||||
def convertstringitemstopublish(String itemstopublishstring) {
|
||||
def List paths = []
|
||||
|
||||
def String[] items = itemstopublishstring.split(',')
|
||||
def String allpaths = ""
|
||||
for(String item : items) {
|
||||
paths.add(item)
|
||||
allpaths += "${path}\n"
|
||||
}
|
||||
echo "Selected item to publish:\n${allpaths}"
|
||||
return paths
|
||||
}
|
||||
|
||||
// Publish selected items from a release to the customer folder on the ftp site
|
||||
// itemstopublishstring is a comma-seperated set of strings in this format <ProductName>#<ComponentName>#<PathToPublishableItem>
|
||||
def publishhierarchy(releasemeta, String itemstopublishstring, String customer, String softwarerelease, String maxdepth) {
|
||||
|
|
|
|||
|
|
@ -246,6 +246,19 @@ def gitsparserestore(String targetDir) {
|
|||
}
|
||||
}
|
||||
|
||||
def List convertSparseItemsString(String itemstopublish) {
|
||||
def List paths = []
|
||||
|
||||
def String[] items = itemstopublish.split(',')
|
||||
def String allpaths = ""
|
||||
for(String item : items) {
|
||||
paths.add(item)
|
||||
allpaths += "${path}\n"
|
||||
}
|
||||
echo "Selected item to publish:\n${allpaths}"
|
||||
return paths
|
||||
}
|
||||
|
||||
def gitCheckoutAlt(String gitURL, String revision, String targetDir, String repoRootSuffix = "", int cloneDepth = 1, boolean shallowClone = true, ArrayList<String> sparseitemlist = new ArrayList<String>()) {
|
||||
echo "Performing alternative checkout"
|
||||
def String reporootpath = lfsinstallandreporoot(gitURL)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue