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 {
46
46
id(" io.gitlab.arturbosch.detekt" ) version " 1.23.8"
47
47
id(" org.openapi.generator" ) version " 7.13.0" apply false
48
48
id(" com.google.cloud.tools.jib" ) version " 3.4.5" apply false
49
+ id(" org.cyclonedx.bom" ) version " 2.3.1"
49
50
}
50
51
51
52
scmVersion { tag { prefix.set(" " ) } }
@@ -114,6 +115,7 @@ allprojects {
114
115
apply (plugin = " io.gitlab.arturbosch.detekt" )
115
116
apply (plugin = " project-report" )
116
117
apply (plugin = " org.owasp.dependencycheck" )
118
+ apply (plugin = " org.cyclonedx.bom" )
117
119
118
120
version = rootProject.scmVersion.version ? : error(" Root project did not configure scmVersion!" )
119
121
@@ -145,6 +147,13 @@ allprojects {
145
147
mavenCentral()
146
148
}
147
149
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
+
148
157
tasks.withType<HtmlDependencyReportTask >().configureEach { projects = project.allprojects }
149
158
150
159
configure<SpotlessExtension > {
You can’t perform that action at this time.
0 commit comments