Add filtered publishing

This commit is contained in:
Dan Hawkins 2019-03-19 08:54:45 +00:00
commit 944f732e89

View file

@ -19,6 +19,16 @@ def SparseCheckoutPaths sparsecheckoutconfig(ArrayList<String> paths) {
return new SparseCheckoutPaths(sparsecheckoutpaths)
}
def guessreporoot(componentURL) {
if (!env.REPO_ROOT || env.REPO_ROOT.size() == 0) {
return ''
}
def guess = componentURL.replaceFirst(/.*\/(.*).git/, '$1')
def reporoot = "${REPO_ROOT}/${guess}"
echo "Guessing reporoot is: ${reporoot}"
return reporoot
}
def gitCheckout(String gitURL, String revision, String targetDir, String repoRootSuffix = "", int cloneDepth = 1, boolean shallowClone = true, ArrayList<String> sparseitemlist = new ArrayList<String>()) {
reporootenv = env.REPO_ROOT
if (reporootenv != null && repoRootSuffix != "") {