Skip to content

Commit

Permalink
Initial CDXA support
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Leonard <[email protected]>
  • Loading branch information
andrew-m-leonard committed Nov 28, 2024
1 parent b3f1a91 commit 2b91c54
Showing 1 changed file with 18 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ********************************************************************************
# Copyright (c) 2023 Contributors to the Eclipse Foundation
# Copyright (c) 2023, 2024 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) with this work for additional
# information regarding copyright ownership.
Expand All @@ -12,7 +12,7 @@
# ********************************************************************************

---
name: TestSBOM
name: TestCycloneDX

on:
pull_request:
Expand All @@ -37,30 +37,42 @@ jobs:
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

# Build with jdk8 to ensure TemurinGenSBOM meets min compatibility
# Build with jdk8 to ensure TemurinGen* meets min compatibility
- uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.5.0
id: setup-java
with:
java-version: 8
distribution: 'temurin'

- name: Build TemurinGenSBOM.java
- name: Build TemurinGenSBOM.java and TemurinGenCDXA.java
run: |
ant -noinput -buildfile cyclonedx-lib/build.xml clean
ant -noinput -buildfile cyclonedx-lib/build.xml build
- name: Run TemurinGenSBOM Unit test
run: ant -noinput -buildfile cyclonedx-lib/build.xml run

- name: Validate generated testSBOM.json using cyclonedx-cli validate
- name: Run TemurinGenCDXA Unit test
run: ant -noinput -buildfile cyclonedx-lib/build.xml runCDXA

- name: Validate generated SBOM and CDXA documents using cyclonedx-cli validate
run: |
curl -L -O https://github.com/CycloneDX/cyclonedx-cli/releases/latest/download/cyclonedx-linux-x64
chmod +x cyclonedx-linux-x64
./cyclonedx-linux-x64 validate --input-file cyclonedx-lib/build/testSBOM.json --fail-on-errors --input-version v1_6
./cyclonedx-linux-x64 validate --input-file cyclonedx-lib/build/testSBOM.xml --fail-on-errors --input-version v1_6
./cyclonedx-linux-x64 validate --input-file cyclonedx-lib/build/testCDXA.json --fail-on-errors --input-version v1_6
./cyclonedx-linux-x64 validate --input-file cyclonedx-lib/build/testCDXA.xml --fail-on-errors --input-version v1_6
- uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
name: Collect and Archive TemurinGenSBOM Artifacts
with:
name: testSBOM
path: cyclonedx-lib/build/testSBOM.json
path: cyclonedx-lib/build/testSBOM.*

- uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
name: Collect and Archive TemurinGenCDXA Artifacts
with:
name: testCDXA
path: cyclonedx-lib/build/testCDXA.*

0 comments on commit 2b91c54

Please sign in to comment.