|
|
|
@ -43,7 +43,7 @@ pipeline {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
stage('find downstream projects') {
|
|
|
|
|
stage('analyze downstream projects') {
|
|
|
|
|
steps {
|
|
|
|
|
script {
|
|
|
|
|
// println "PROJECT ${inputProject} BUILDS ${projects2artifacts[inputProject]} artifacts"
|
|
|
|
@ -59,7 +59,17 @@ pipeline {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
stage('print report') {
|
|
|
|
|
steps {
|
|
|
|
|
script {
|
|
|
|
|
printReport(report)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// look for modules that use this artifact
|
|
|
|
|
def findDownstreamDependencies(modules2deps, artifact) {
|
|
|
|
|
def downdeps = []
|
|
|
|
|
//println "Looking for users of ${artifact}"
|
|
|
|
@ -67,6 +77,7 @@ def findDownstreamDependencies(modules2deps, artifact) {
|
|
|
|
|
downdeps
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//build the report of the given dependency, go recursive on its dependencies
|
|
|
|
|
def analyzeDependency(modules2deps, artifacts2projects, report, artifact, deep) {
|
|
|
|
|
def level = "L${deep}"
|
|
|
|
|
report['downstream_modules'][level][artifact] = [ 'dependencies':[], 'projects':[] ]
|
|
|
|
@ -93,6 +104,7 @@ def analyzeDependency(modules2deps, artifacts2projects, report, artifact, deep)
|
|
|
|
|
report
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// print the final report
|
|
|
|
|
def printReport(report) {
|
|
|
|
|
def text = ''
|
|
|
|
|
def indent = '\t'
|
|
|
|
@ -125,7 +137,7 @@ def printReport(report) {
|
|
|
|
|
}
|
|
|
|
|
println text
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// debug job
|
|
|
|
|
def printJob(job) {
|
|
|
|
|
println("fullname ${job.fullName}")
|
|
|
|
|
println("name ${job.name}")
|
|
|
|
|