File tree Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,11 @@ function show-sbom() {
14
14
echo -n " ."
15
15
status=0
16
16
echo
17
+ image_registry=" ${IMAGE_URL/ \/ */ } "
18
+ # If the repo is not publicly accessible we need to authenticate so ec can access it
19
+ prepare-registry-user-pass $image_registry
20
+ echo " cosign login to registry $image_registry "
21
+ cosign login --username=" $IMAGE_REGISTRY_USER " --password=" $IMAGE_REGISTRY_PASSWORD " $image_registry
17
22
echo " SBOM_EYECATCHER_BEGIN"
18
23
cosign download sbom $IMAGE_URL 2>> $RESULTS /err
19
24
status=$?
Original file line number Diff line number Diff line change @@ -23,9 +23,22 @@ function appstudio-summary() {
23
23
echo End Summary
24
24
25
25
}
26
+ # missing tree command
27
+ function showTree() {
28
+ find $1 | sed -e " s/[^-][^\/]*\// ├─/g" -e " s/|\([^ ]\)/|─\1/"
29
+ }
30
+ function cosignTree() {
31
+ URL=$1
32
+ image_registry=" ${URL/ \/ */ } "
33
+ # If the repo is not publicly accessible we need to authenticate so ec can access it
34
+ prepare-registry-user-pass $image_registry
35
+ echo " cosign login to registry $image_registry "
36
+ cosign login --username=" $IMAGE_REGISTRY_USER " --password=" $IMAGE_REGISTRY_PASSWORD " $image_registry
37
+ cosign tree $URL
38
+ }
26
39
27
40
# Task Steps
28
41
appstudio-summary
29
- tree $BASE_RESULTS
30
- cosign tree $IMAGE_URL
42
+ showTree $BASE_RESULTS
43
+ cosignTree $IMAGE_URL
31
44
exit_with_success_result
You can’t perform that action at this time.
0 commit comments