File tree Expand file tree Collapse file tree 2 files changed +52
-0
lines changed Expand file tree Collapse file tree 2 files changed +52
-0
lines changed Original file line number Diff line number Diff line change 1+ # Copyright (c) 2023, 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+ env :
12+ variables :
13+ " JAVA_HOME " : " /usr/lib64/graalvm/graalvm22-ee-java17"
14+ steps :
15+ - type : Command
16+ name : " Update graalvm version"
17+ command : |
18+ yum -y install graalvm22-ee-17-jdk
19+ export PATH=$JAVA_HOME/bin:$PATH
20+ - type : Command
21+ name : " Run Gradle cyclonedxBom command"
22+ command : |
23+ # For more details, visit https://github.com/CycloneDX/cyclonedx-gradle-plugin/blob/master/README.md
24+ cat <<EOF >> init.gradle
25+ initscript {
26+ repositories {
27+ maven {
28+ url "https://plugins.gradle.org/m2/"
29+ }
30+ }
31+ dependencies {
32+ classpath "org.cyclonedx:cyclonedx-gradle-plugin:1.7.4"
33+ }
34+ }
35+ allprojects {
36+ apply plugin:org.cyclonedx.gradle.CycloneDxPlugin
37+ cyclonedxBom {
38+ includeConfigs = ["runtimeClasspath", "compileClasspath"]
39+ skipConfigs = ["testCompileClasspath"]
40+ projectType = "application"
41+ destination = file(".")
42+ outputName = "artifactSBOM"
43+ outputFormat = "json"
44+ schemaVersion = "1.4"
45+ }
46+ }
47+ EOF
48+ ./gradlew --init-script init.gradle cyclonedxBom -info
49+ outputArtifacts :
50+ - name : artifactSBOM
51+ type : BINARY
52+ location : ${OCI_PRIMARY_SOURCE_DIR}/artifactSBOM.json
You can’t perform that action at this time.
0 commit comments