Always create a repo_root copy of a repo when necessary - in order to speed up jobs

This commit is contained in:
Dan Hawkins 2019-03-29 08:48:35 +00:00
commit d3e547b6c4

View file

@ -19,16 +19,6 @@ 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 String uniquereporootname(String gitURL) {
def uniquename = gitURL.replaceAll("[^A-Za-z0-9]", "_")
echo "Unique reporoot name for URL: ${gitURL} is: ${uniquename}"
@ -68,6 +58,7 @@ def String checkouttoreporoot(String gitURL) {
} else {
echo "Found ${gitURL} checked out at ${reporootname}"
}
}
return reporootsubfolder
}