Improve report structure.

This commit is contained in:
Manuele Simi 2020-03-12 10:29:12 -04:00
parent 3b70bfc602
commit d651083ee8
1 changed files with 4 additions and 4 deletions

8
Jenkinsfile vendored
View File

@ -26,7 +26,7 @@ pipeline {
p.getAllJobs().each { j -> projects2artifacts[p.name] << j.name; artifacts2projects[j.name] = p.name }
}
println "FOUND ${projects2artifacts.size()} projects"
//projects2artifacts.each { k,v -> println ("PROJECT ${k} BUILDS ${v}") }
projects2artifacts.each { k,v -> println ("PROJECT ${k} BUILDS ${v}") }
}
}
}
@ -111,17 +111,17 @@ def printReport(report) {
def indent = '\t'
text += "Dependency Report for ${report['project']} (jenkins project)"
text += "\n\n"
text += "|--Project Modules\n"
text += "|--Project Maven Modules\n"
report['downstream_modules'].each { deep, artifacts ->
artifacts.each { name, data ->
text += "${indent}|--Module: ${name}\n"
text += "${indent*2}|--Dependency Level: ${deep}\n"
text += "${indent*2}|--Downstream Modules\n"
text += "${indent*2}|--Used by (Maven Modules)\n"
data['dependencies'].each {d ->
text += "${indent*3}|--${d}"
text += "\n"
}
text += "${indent*2}|--Downstream Projects\n"
text += "${indent*2}|--Referred by (Jenkins Projects)\n"
data['projects'].each { p ->
text += "${indent*3}|--${p}"
text += "\n"