File tree 4 files changed +48
-0
lines changed
4 files changed +48
-0
lines changed Original file line number Diff line number Diff line change 37
37
- name : Build
38
38
run : ./gradlew build reckonTagPush -Preckon.stage=final -Preckon.scope=${{ github.event.inputs.releaseType }} --stacktrace
39
39
40
+ - name : Generate SBOM
41
+ run : ./gradlew --init-script init.gradle cyclonedxBom
42
+
40
43
- name : Release
41
44
run : ./gradlew publish --no-configuration-cache
42
45
env :
Original file line number Diff line number Diff line change @@ -48,6 +48,10 @@ mavenPublishing {
48
48
classifier = " bin"
49
49
extension = " tar.gz"
50
50
}
51
+ artifact(file(" $buildDir /reports/bom.json" )) {
52
+ classifier = " sbom"
53
+ extension = " json"
54
+ }
51
55
}
52
56
}
53
57
}
Original file line number Diff line number Diff line change @@ -54,6 +54,19 @@ mavenPublishing {
54
54
developerConnection
= " scm:git:ssh://[email protected] /BisonSchweizAG/commercetools-datalift.git"
55
55
}
56
56
}
57
+
58
+ afterEvaluate {
59
+ publishing {
60
+ publications {
61
+ maven(MavenPublication ) {
62
+ artifact(file(" $buildDir /reports/bom.json" )) {
63
+ classifier = " sbom"
64
+ extension = " json"
65
+ }
66
+ }
67
+ }
68
+ }
69
+ }
57
70
}
58
71
59
72
test {
Original file line number Diff line number Diff line change
1
+ import org.cyclonedx.model.* ;
2
+
3
+ initscript {
4
+ repositories {
5
+ maven {
6
+ url " https://plugins.gradle.org/m2/"
7
+ }
8
+ }
9
+ dependencies {
10
+ classpath " org.cyclonedx:cyclonedx-gradle-plugin:2.2.0"
11
+ }
12
+ }
13
+
14
+ allprojects {
15
+ apply plugin : org.cyclonedx.gradle.CycloneDxPlugin
16
+ cyclonedxBom {
17
+ includeConfigs = [" runtimeClasspath" ]
18
+ // declaration of the Object from OrganizationalContact
19
+ OrganizationalContact organizationalContact = new OrganizationalContact ()
20
+
21
+ // passing Data to the plugin
22
+ organizationalEntity { oe ->
23
+ oe. name = ' Bison Schweiz AG'
24
+ oe. url = [' www.bison-group.com' ]
25
+ oe. addContact(organizationalContact)
26
+ }
27
+ }
28
+ }
You can’t perform that action at this time.
0 commit comments