forked from graalvm/setup-graalvm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trying out improved test.yml approach for checking SBOM contents
- Loading branch information
Showing
7 changed files
with
106 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
@echo off | ||
cd target | ||
|
||
for %%p in ( | ||
"\"pkg:maven/org.json/json@20211205\"" | ||
"\"main-test-app\"" | ||
"\"svm\"" | ||
"\"nativeimage\"" | ||
) do ( | ||
echo Checking for %%p | ||
findstr /c:%%p sbom.sbom.json || exit /b 1 | ||
) | ||
|
||
echo SBOM was successfully generated and contained the expected contents |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
cd target | ||
|
||
required_patterns=( | ||
'"pkg:maven/org.json/json@20211205"' | ||
'"main-test-app"' | ||
'"svm"' | ||
'"nativeimage"' | ||
) | ||
|
||
for pattern in "${required_patterns[@]}"; do | ||
echo "Checking for $pattern" | ||
if ! grep -q "$pattern" sbom.sbom.json; then | ||
echo "Pattern not found: $pattern" | ||
exit 1 | ||
fi | ||
done | ||
|
||
echo "SBOM was successfully generated and contained the expected contents" |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.