Skip to content
Snippets Groups Projects
Unverified Commit a2f95dd0 authored by Martin Christoph Hierholzer's avatar Martin Christoph Hierholzer Committed by GitHub
Browse files

Update helper.groovy

parent 0d14e8eb
No related branches found
No related tags found
No related merge requests found
......@@ -6,6 +6,34 @@
/**********************************************************************************************************************/
// helper function, recursively gather a deep list of dependencies
def gatherDependenciesDeep(ArrayList<String> dependencyList) {
def deepList = dependencyList
dependencyList.each {
node('Docker') {
copyArtifacts filter: "dependencyList.txt", fingerprintArtifacts: true, projectName: "${it}", selector: lastSuccessful(), target: "artefacts"
def myFile = readFile(env.WORKSPACE+"/artefacts/dependencyList.txt")
def dependencyList2 = myFile.split("\n")
deepList.addAll(gatherDependenciesDeep(dependencyList2))
}
}
return deepList.unique()
}
/**********************************************************************************************************************/
// helper function, recursively wait until all dependencies are not building
def waitForDependencies(ArrayList<String> deepDependencyList) {
if(deepDependencyList.size() == 0) return
lock("build-${deepDependencyList[0]}") {
def deepDependencyListTrunc = deepDependencyList
deepDependencyListTrunc.remove(0)
waitForDependencies(deepDependencyListTrunc)
}
}
/**********************************************************************************************************************/
def doBuildTestDeploy(ArrayList<String> dependencyList, String label, String buildType, String gitUrl) {
// prepare source directory and dependencies
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment