Skip to content

Commit 7e819f4

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 3e3f775 commit 7e819f4

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

rhtap/upload-sbom-to-trustification.sh

+11
Original file line numberDiff line numberDiff line change
@@ -198,3 +198,14 @@ 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"
211+

0 commit comments

Comments
 (0)