File tree Expand file tree Collapse file tree 2 files changed +43
-0
lines changed
Expand file tree Collapse file tree 2 files changed +43
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Track Dependencies
2+
3+ on :
4+ workflow_dispatch :
5+ push :
6+ branches :
7+ - main
8+ - ' release/**'
9+ - ' DSE/platform_dependencies_PROD-14600' # for debugging during development
10+
11+ jobs :
12+ dependency_track :
13+ runs-on : ubuntu-latest
14+ steps :
15+ - uses : actions/checkout@v4
16+ - name : Set up JDK
17+ uses : actions/setup-java@v4
18+ with :
19+ distribution : ' temurin'
20+ java-version : ' 23'
21+ - name : Setup Gradle
22+ uses :
gradle/actions/[email protected] 23+ with :
24+ cache-disabled : true
25+ - name : Track dependencies
26+ env :
27+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
28+ run : ./gradlew cyclonedxBom
29+ - name : Upload CycloneDX BOM
30+ uses : actions/upload-artifact@v4
31+ with :
32+ name : cosmotech-api-bom
33+ path : build/reports/cosmotech-api-bom.xml
34+ overwrite : true
Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ plugins {
4646 id(" io.gitlab.arturbosch.detekt" ) version " 1.23.8"
4747 id(" org.openapi.generator" ) version " 7.13.0" apply false
4848 id(" com.google.cloud.tools.jib" ) version " 3.4.5" apply false
49+ id(" org.cyclonedx.bom" ) version " 2.3.1"
4950}
5051
5152scmVersion { tag { prefix.set(" " ) } }
@@ -114,6 +115,7 @@ allprojects {
114115 apply (plugin = " io.gitlab.arturbosch.detekt" )
115116 apply (plugin = " project-report" )
116117 apply (plugin = " org.owasp.dependencycheck" )
118+ apply (plugin = " org.cyclonedx.bom" )
117119
118120 version = rootProject.scmVersion.version ? : error(" Root project did not configure scmVersion!" )
119121
@@ -145,6 +147,13 @@ allprojects {
145147 mavenCentral()
146148 }
147149
150+ tasks.cyclonedxBom {
151+ includeConfigs = listOf (" runtimeClasspath" )
152+ outputFormat = " xml" // by default it would also generate json
153+ projectType = " application"
154+ outputName = " cosmotech-api-bom"
155+ }
156+
148157 tasks.withType<HtmlDependencyReportTask >().configureEach { projects = project.allprojects }
149158
150159 configure<SpotlessExtension > {
You can’t perform that action at this time.
0 commit comments