Skip to content

Commit

Permalink
TECH-1268: Add SBOM creation (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
bpapez authored Jul 19, 2023
1 parent 32a65b6 commit 07c18b1
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 1 deletion.
13 changes: 13 additions & 0 deletions .github/workflows/on-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,19 @@ jobs:
nexus_username: ${{ secrets.NEXUS_USERNAME }}
nexus_password: ${{ secrets.NEXUS_PASSWORD }}
module_id: search

sbom:
name: SBOM processing
needs: build
runs-on: ubuntu-latest
container:
image: cyclonedx/cyclonedx-cli:0.24.2
steps:
- uses: jahia/jahia-modules-action/sbom-processing@v2
with:
dependencytrack_hostname: ${{ vars.DEPENDENCYTRACK_HOSTNAME }}
dependencytrack_apikey: ${{ secrets.DEPENDENCYTRACK_APIKEY }}
sbom_artifacts: 'build-artifacts'

publish:
name: Publish module
Expand Down
14 changes: 13 additions & 1 deletion .github/workflows/on-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,16 @@ jobs:
- name: Setup tmate session
if: ${{ failure() }}
uses: mxschmitt/action-tmate@v3
timeout-minutes: 15
timeout-minutes: 15

sbom:
name: SBOM processing
needs: on-release
runs-on: ubuntu-latest
container:
image: cyclonedx/cyclonedx-cli:0.24.2
steps:
- uses: jahia/jahia-modules-action/sbom-processing@v2
with:
dependencytrack_hostname: ${{ vars.DEPENDENCYTRACK_HOSTNAME }}
dependencytrack_apikey: ${{ secrets.DEPENDENCYTRACK_APIKEY }}
31 changes: 31 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,35 @@
</repository>
</repositories>

<build>
<plugins>
<plugin>
<groupId>org.cyclonedx</groupId>
<artifactId>cyclonedx-maven-plugin</artifactId>
<version>2.7.9</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>makeAggregateBom</goal>
</goals>
</execution>
</executions>
<configuration>
<projectType>library</projectType>
<schemaVersion>1.4</schemaVersion>
<includeBomSerialNumber>true</includeBomSerialNumber>
<includeCompileScope>true</includeCompileScope>
<includeProvidedScope>false</includeProvidedScope>
<includeRuntimeScope>true</includeRuntimeScope>
<includeSystemScope>false</includeSystemScope>
<includeTestScope>false</includeTestScope>
<includeLicenseText>false</includeLicenseText>
<outputReactorProjects>true</outputReactorProjects>
<outputFormat>json</outputFormat>
<outputName>java-bom.cdx</outputName>
</configuration>
</plugin>
</plugins>
</build>
</project>

0 comments on commit 07c18b1

Please sign in to comment.