Skip to content

Commit

Permalink
TECH-1268: Add SBOM creation (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
bpapez committed Jul 20, 2023
1 parent 7cbe060 commit 4564fff
Show file tree
Hide file tree
Showing 3 changed files with 58 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 @@ -41,6 +41,19 @@ jobs:
nexus_password: ${{ secrets.NEXUS_PASSWORD }}
module_id: userDashboard
mvn_settings_filepath: '.github/maven.settings.xml'

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 @@ -68,4 +68,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 }}
32 changes: 32 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,36 @@
<url>https://devtools.jahia.com/nexus/content/groups/public</url>
</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 4564fff

Please sign in to comment.