Skip to content

Commit fcd24c2

Browse files
committed
Expose the link to an uploaded SBOM in TPA
SBOMs are getting uploaded to Red Hat Trusted Profile Analyzer in the GitOps pipeline. Expose the link to the uploaded SBOM and wrap it around `TPA_SBOM_EYECATCHER` so that it can be used in UI. Example output: TPA_SBOM_URL_EYECATCHER_BEGIN { "TPA_SBOM_URL": "<url>" } Signed-off-by: Tomáš Nevrlka <[email protected]>
1 parent c936379 commit fcd24c2

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

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)