|
| 1 | +# |
| 2 | +# Copyright (c) 2023, 2025 Oracle and/or its affiliates. |
| 3 | +# |
| 4 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | +# you may not use this file except in compliance with the License. |
| 6 | +# You may obtain a copy of the License at |
| 7 | +# |
| 8 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | +# |
| 10 | +# Unless required by applicable law or agreed to in writing, software |
| 11 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | +# See the License for the specific language governing permissions and |
| 14 | +# limitations under the License. |
| 15 | +# |
| 16 | + |
| 17 | +# This OCI DevOps build specification file [1] generates a Software Bill of Materials (SBOM) of the repository. |
| 18 | +# The file is needed to run checks for third-party vulnerabilities and business approval according to Oracle’s GitHub policies. |
| 19 | +# [1] https://docs.oracle.com/en-us/iaas/Content/devops/using/build_specs.htm |
| 20 | + |
| 21 | +version: 0.1 |
| 22 | +component: build |
| 23 | +timeoutInSeconds: 1000 |
| 24 | +shell: bash |
| 25 | + |
| 26 | +steps: |
| 27 | + - type: Command |
| 28 | + name: "Run Maven cycloneDX plugin command" |
| 29 | + command: | |
| 30 | + # For more details, visit https://github.com/CycloneDX/cyclonedx-maven-plugin/blob/master/README.md |
| 31 | + mvn org.cyclonedx:cyclonedx-maven-plugin:2.9.1:makeAggregateBom \ |
| 32 | + -DincludeRuntimeScope=true \ |
| 33 | + -DincludeCompileScope=true \ |
| 34 | + -DincludeProvidedScope=false \ |
| 35 | + -DincludeSystemScope=false \ |
| 36 | + -DincludeTestScope=false \ |
| 37 | + -DoutputFormat=json \ |
| 38 | + -DoutputName=artifactSBOM \ |
| 39 | + -DschemaVersion=1.4 |
| 40 | + mv target/artifactSBOM.json ${OCI_PRIMARY_SOURCE_DIR}/artifactSBOM.json |
| 41 | +outputArtifacts: |
| 42 | + - name: artifactSBOM |
| 43 | + type: BINARY |
| 44 | + location: ${OCI_PRIMARY_SOURCE_DIR}/artifactSBOM.json |
0 commit comments