Add some formatting to the report.

This commit is contained in:
Manuele Simi 2020-03-11 14:13:21 -04:00
parent 5e7d17deba
commit be52e8ec61
1 changed files with 9 additions and 9 deletions

18
Jenkinsfile vendored
View File

@ -112,29 +112,29 @@ def printReport(report) {
def indent = '\t' def indent = '\t'
text += "Dependency Report for ${report['project']} (jenkins project)" text += "Dependency Report for ${report['project']} (jenkins project)"
text += "\n\n" text += "\n\n"
text += "Project Modules\n" text += "\--Project Modules\n"
report['downstream_modules'].each { deep, artifacts -> report['downstream_modules'].each { deep, artifacts ->
artifacts.each { name, data -> artifacts.each { name, data ->
text += "${indent}Module Name: ${name}\n" text += "${indent}|--Module Name: ${name}\n"
text += "${indent}Dependency Level: ${deep}\n" text += "${indent}|--Dependency Level: ${deep}\n"
text += "${indent}\tDownstream Modules for ${name}\n" text += "${indent}\--Downstream Modules for ${name}\n"
data['dependencies'].each {d -> data['dependencies'].each {d ->
text += "${indent}\t\t${d}" text += "${indent}\t|--${d}"
text += "\n" text += "\n"
} }
text += "${indent}\tDownstream Projects for ${name}\n" text += "${indent}\t\--Downstream Projects for ${name}\n"
data['projects'].each { p -> data['projects'].each { p ->
text += "${indent}\t\t${p}" text += "${indent}\t|--${p}"
text += "\n" text += "\n"
} }
} }
} }
text += "\n\n" text += "\n\n"
text += "All Downstream Projects\n" text += "\--All Downstream Projects\n"
report['downstream_projects'].unique().sort() report['downstream_projects'].unique().sort()
report['downstream_projects'].each { p -> report['downstream_projects'].each { p ->
text += "${indent}${p}" text += "${indent}|--${p}"
text += "\n" text += "\n"
} }
println text println text