Add filtered publishing

This commit is contained in:
Dan Hawkins 2019-03-19 08:34:07 +00:00
commit 9ee093481d

View file

@ -41,6 +41,16 @@ def summaryappend(String summary) {
summarystring += summary
}
def guessreporoot(componentURL) {
if (env.REPOROOT || env.REPOROOT.length() == 0) {
return ''
}
def guess = componentURL.replaceFirst(/.*\/(.*).git/, '$1')
def reporoot = "${REPOROOT}/${guess}"
echo "Guessing reporoot is: ${reporoot}"
return reporoot
}
gh = load("${autobuilder.commonscripts()}/versioncontrol/git.groovy")
def getcomponentartifacts(releaseinfo, String repofolder, String tempfolder) {
// Copy relevant artifacts to temp folder
@ -56,7 +66,8 @@ def getcomponentartifacts(releaseinfo, String repofolder, String tempfolder) {
publishablePaths.add(publishableitem.filepath)
summaryappend("${publishableitem.filepath},")
}
gh.gitCheckout(componentURL, revision, repofolder, "", 1, true, publishablePaths) // Shallow clone
def reporoot = guessreporoot(componentURL)
gh.gitCheckout(componentURL, revision, repofolder, reporoot, 1, true, publishablePaths) // Shallow clone
}
else {
summaryappend("None ")