Skip to content

Commit 695f5fb

Browse files
authored
Merge pull request #944 from Cosmo-Tech/DSE/aggregate_reports_PROD-14264
Dse/aggregate reports prod 14264
2 parents f80019e + e70a1bb commit 695f5fb

File tree

222 files changed

+103
-32186
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

222 files changed

+103
-32186
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>Project Reports</title>
5+
<link rel="stylesheet" type="text/css" href="reports-style.css">
6+
</head>
7+
<body>
8+
<h1>Project Reports</h1>
9+
10+
<div class="reports-section">
11+
<h2>Main Reports</h2>
12+
<ul>
13+
<li><a href="kover/html/index.html">Code Coverage Report</a></li>
14+
<li><a href="problems/problems-report.html">Build Problems Report</a></li>
15+
<li><a href="project/dependencies/index.html">Dependencies Report</a></li>
16+
<li><a href="dependency-license/index.html">Licenses Report</a></li>
17+
</ul>
18+
</div>
19+
20+
21+
<div class="reports-section">
22+
<h2>Detekt Reports</h2>
23+
<ul>
24+
<li><a href="detekt/html/cosmotech-api-detekt.html">API Module Analysis</a></li>
25+
<li><a href="detekt/html/cosmotech-connector-api-detekt.html">Connector Module Analysis</a></li>
26+
<li><a href="detekt/html/cosmotech-dataset-api-detekt.html">Dataset Module Analysis</a></li>
27+
<li><a href="detekt/html/cosmotech-meta-api-detekt.html">Meta Module Analysis</a></li>
28+
<li><a href="detekt/html/cosmotech-metrics-service-detekt.html">Metrics Module Analysis</a></li>
29+
<li><a href="detekt/html/cosmotech-organization-api-detekt.html">Organization Module Analysis</a></li>
30+
<li><a href="detekt/html/cosmotech-run-api-detekt.html">Run Module Analysis</a></li>
31+
<li><a href="detekt/html/cosmotech-runner-api-detekt.html">Runner Module Analysis</a></li>
32+
<li><a href="detekt/html/cosmotech-solution-api-detekt.html">Solution Module Analysis</a></li>
33+
<li><a href="detekt/html/cosmotech-workspace-api-detekt.html">Workspace Module Analysis</a></li>
34+
</ul>
35+
</div>
36+
</body>
37+
</html>
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
body {
2+
font-family: Arial, sans-serif;
3+
margin: 20px;
4+
line-height: 1.6;
5+
max-width: 1200px;
6+
margin: 0 auto;
7+
padding: 20px;
8+
}
9+
h1, h2 {
10+
color: #333;
11+
}
12+
.reports-section {
13+
margin: 20px 0;
14+
}
15+
ul {
16+
list-style-type: none;
17+
padding: 0;
18+
}
19+
li {
20+
margin: 10px 0;
21+
}
22+
a {
23+
color: #0366d6;
24+
text-decoration: none;
25+
display: inline-block;
26+
padding: 4px 0;
27+
}
28+
a:hover {
29+
text-decoration: underline;
30+
}

build.gradle.kts

Lines changed: 36 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -92,14 +92,10 @@ val awaitilityKVersion = "4.2.0"
9292
val testcontainersRedis = "1.6.4"
9393
val springMockkVersion = "4.0.2"
9494

95-
var licenseReportDir = "$projectDir/doc/licenses"
96-
9795
val configBuildDir = "${layout.buildDirectory.get()}/config"
9896

9997
mkdir(configBuildDir)
10098

101-
val hardCodedLicensesReportPath = "project-licenses-for-check-license-task.json"
102-
10399
dependencyCheck {
104100
// Configure dependency check plugin. It checks for publicly disclosed
105101
// vulnerabilities in project dependencies. To use it, you need to have an
@@ -110,16 +106,12 @@ dependencyCheck {
110106
}
111107

112108
licenseReport {
113-
outputDir = licenseReportDir
114109
allowedLicensesFile =
115110
"https://raw.githubusercontent.com/Cosmo-Tech/cosmotech-license/refs/heads/main/config/allowed-licenses.json"
116111
val bundle =
117112
"https://raw.githubusercontent.com/Cosmo-Tech/cosmotech-license/refs/heads/main/config/license-normalizer-bundle.json"
118113

119-
renderers =
120-
arrayOf<ReportRenderer>(
121-
InventoryHtmlReportRenderer("index.html"),
122-
JsonReportRenderer("project-licenses-for-check-license-task.json", false))
114+
renderers = arrayOf<ReportRenderer>(InventoryHtmlReportRenderer("index.html"))
123115
filters =
124116
arrayOf<LicenseBundleNormalizer>(
125117
LicenseBundleNormalizer(uri(bundle).toURL().openStream(), true))
@@ -643,3 +635,38 @@ tasks.register<ReportTask>("generateLicenseDoc") {
643635
group = "license"
644636
description = "Generate Licenses report"
645637
}
638+
639+
tasks.register("generateAllReports") {
640+
group = "reporting"
641+
description =
642+
"""Generates all available reports (test, coverage, dependencies, licenses, detekt)
643+
|/!\ Warning: Please do not run this task locally, tests are really resource consuming
644+
"""
645+
.trimMargin()
646+
dependsOn(
647+
// Test reports, need to gather them first
648+
// Please do not run this task locally, tests are really resource consuming
649+
"test",
650+
"integrationTest",
651+
// Coverage reports
652+
"koverHtmlReport",
653+
// Dependency reports
654+
"htmlDependencyReport",
655+
// License reports
656+
"generateLicenseReport",
657+
// Code analysis reports
658+
"detekt")
659+
doLast {
660+
// Create reports directory if it doesn't exist
661+
val reportsDir = layout.buildDirectory.get().dir("reports").asFile
662+
reportsDir.mkdirs()
663+
// Copy the template file to the reports directory
664+
copy {
665+
from("api/src/main/resources") {
666+
include("reports-index.html")
667+
include("reports-style.css")
668+
}
669+
into(reportsDir)
670+
}
671+
}
672+
}

doc/licenses/HdrHistogram-2.2.2.jar/META-INF/LICENSE.txt

Lines changed: 0 additions & 41 deletions
This file was deleted.

doc/licenses/angus-activation-2.0.2.jar/META-INF/LICENSE.md

Lines changed: 0 additions & 29 deletions
This file was deleted.

doc/licenses/angus-activation-2.0.2.jar/META-INF/NOTICE.md

Lines changed: 0 additions & 45 deletions
This file was deleted.

0 commit comments

Comments
 (0)