1
+ # Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved.
2
+
3
+ # This OCI DevOps build specification file [1] generates a Software Bill of Materials (SBOM) of the repository.
4
+ # The file is needed to run checks for third-party vulnerabilities and business approval according to Oracle’s GitHub policies.
5
+ # [1] https://docs.oracle.com/en-us/iaas/Content/devops/using/build_specs.htm
6
+
7
+ version : 0.1
8
+ component : build
9
+ timeoutInSeconds : 1000
10
+ shell : bash
11
+
12
+ steps :
13
+ - type : Command
14
+ name : " Run Maven cycloneDX plugin command"
15
+ command : |
16
+ # For more details, visit https://github.com/CycloneDX/cyclonedx-maven-plugin/blob/master/README.md
17
+ cd spring-cloud-oci/
18
+ mvn org.cyclonedx:cyclonedx-maven-plugin:2.7.9:makeAggregateBom -DincludeRuntimeScope=true -DincludeCompileScope=true -DincludeProvidedScope=false -DincludeSystemScope=false -DincludeTestScope=false -DoutputFormat=json -DoutputName=artifactSBOM -DschemaVersion=1.4
19
+ cd ..
20
+
21
+ - type : Command
22
+ name : " Run Maven cycloneDX plugin command"
23
+ command : |
24
+ # For more details, visit https://github.com/CycloneDX/cyclonedx-maven-plugin/blob/master/README.md
25
+ cd database/starters
26
+ mvn org.cyclonedx:cyclonedx-maven-plugin:2.7.9:makeAggregateBom -DincludeRuntimeScope=true -DincludeCompileScope=true -DincludeProvidedScope=false -DincludeSystemScope=false -DincludeTestScope=false -DoutputFormat=json -DoutputName=artifactSBOM -DschemaVersion=1.4
27
+ cd ../..
28
+
29
+ - type : Command
30
+ name : " Run Maven cycloneDX plugin command"
31
+ command : |
32
+ # For more details, visit https://github.com/CycloneDX/cyclonedx-maven-plugin/blob/master/README.md
33
+ cd database/spring-cloud-stream-binder-oracle-txeventq
34
+ mvn org.cyclonedx:cyclonedx-maven-plugin:2.7.9:makeAggregateBom -DincludeRuntimeScope=true -DincludeCompileScope=true -DincludeProvidedScope=false -DincludeSystemScope=false -DincludeTestScope=false -DoutputFormat=json -DoutputName=artifactSBOM -DschemaVersion=1.4
35
+ cd ../..
36
+
37
+ # Start merging the artifacts
38
+ - type : Command
39
+ name : " Download CycloneDx-cli executable and install dependencies"
40
+ command : |
41
+ wget https://github.com/CycloneDX/cyclonedx-cli/releases/download/v0.27.1/cyclonedx-linux-x64
42
+ yum install -y libicu
43
+
44
+ - type : Command
45
+ name : " Merge multiple SBOMs using CycloneDX-cli"
46
+ command : |
47
+ # For more details, visit https://github.com/CycloneDX/cyclonedx-cli/blob/main/README.md
48
+ chmod +x cyclonedx-linux-x64
49
+ ./cyclonedx-linux-x64 merge --input-files ./spring-cloud-oci/target/artifactSBOM.json ./database/starters/target/artifactSBOM.json ./database/spring-cloud-stream-binder-oracle-txeventq/target/artifactSBOM.json --output-file merged-bom.json
50
+
51
+ outputArtifacts :
52
+ - name : artifactSBOM
53
+ type : BINARY
54
+ location : ${OCI_PRIMARY_SOURCE_DIR}/merged-bom.json
0 commit comments