Skip to content

Commit 5587401

Browse files
authored
Merge pull request #217 from tnevrlka/more-eyecatchers
Add SBOM and task summary eyecatchers
2 parents 4093170 + fcd24c2 commit 5587401

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

rhtap/summary.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,20 @@ function cosignTree() {
3434
cosign tree $URL
3535
}
3636

37+
echo "SUMMARY_EYECATCHER_BEGIN"
38+
39+
jq '{results: .}' -s < <(
40+
find "$BASE_RESULTS" -mindepth 2 -maxdepth 2 -name STATUS | while read -r status_file; do
41+
name=$(basename "$(dirname "$status_file")")
42+
result=$(tr '[:upper:]' '[:lower:]' < "$status_file")
43+
44+
jq -n --arg name "$name" --arg result "$result" \
45+
'{name: $name, result: $result}'
46+
done
47+
)
48+
49+
echo "SUMMARY_EYECATCHER_END"
50+
3751
# Task Steps
3852
appstudio-summary
3953
showTree $BASE_RESULTS

rhtap/upload-sbom-to-trustification.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,3 +198,13 @@ for sbom_path in "${sboms_to_upload[@]}"; do
198198
--data "@$supported_version_of_sbom" \
199199
"$bombastic_api_url/api/v1/sbom?id=$sbom_id"
200200
done
201+
202+
echo ""
203+
echo "TPA_SBOM_URL_EYECATCHER_BEGIN"
204+
205+
tpa_url=${bombastic_api_url//sbom/console}
206+
tpa_sbom_id="${sbom_id//sha256:/sha256%3A}"
207+
208+
jq -n --arg url "$tpa_url/sbom/content/$tpa_sbom_id" '{"TPA_SBOM_URL": $url}'
209+
210+
echo "TPA_SBOM_URL_EYECATCHER_END"

0 commit comments

Comments
 (0)