Skip to content

Commit

Permalink
fix(STONEBLD-2496, KFLUXBUGS-1317) Ensure that the base image digest …
Browse files Browse the repository at this point in the history
…result is present

If there is no base image (i.e. if the image is only FROM scratch), then
the file will not be present and therefore step-create-base-images-sbom
will fail.

Resolves: https://issues.redhat.com/browse/STONEBLD-2496
Resolves: https://issues.redhat.com/browse/KFLUXBUGS-1317

Signed-off-by: arewm <[email protected]>
  • Loading branch information
arewm committed Jun 6, 2024
1 parent 33b11cb commit a2d37bc
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions task/buildah-oci-ta/0.1/buildah-oci-ta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ spec:
fi
# Expose base image digests
touch $(results.BASE_IMAGES_DIGESTS.path)
for image in $BASE_IMAGES; do
if [ "${image}" != "scratch" ]; then
buildah images --format '{{ .Name }}:{{ .Tag }}@{{ .Digest }}' --filter reference="$image" >> $(results.BASE_IMAGES_DIGESTS.path)
Expand Down
1 change: 1 addition & 0 deletions task/buildah-remote-oci-ta/0.1/buildah-remote-oci-ta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@ spec:
fi
# Expose base image digests
touch $(results.BASE_IMAGES_DIGESTS.path)
for image in $BASE_IMAGES; do
if [ "${image}" != "scratch" ]; then
buildah images --format '{{ .Name }}:{{ .Tag }}@{{ .Digest }}' --filter reference="$image" >> $(results.BASE_IMAGES_DIGESTS.path)
Expand Down
1 change: 1 addition & 0 deletions task/buildah-remote/0.1/buildah-remote.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,7 @@ spec:
fi
# Expose base image digests
touch $(results.BASE_IMAGES_DIGESTS.path)
for image in $BASE_IMAGES; do
if [ "${image}" != "scratch" ]; then
buildah images --format '{{ .Name }}:{{ .Tag }}@{{ .Digest }}' --filter reference="$image" >> $(results.BASE_IMAGES_DIGESTS.path)
Expand Down
1 change: 1 addition & 0 deletions task/buildah/0.1/buildah.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ spec:
fi
# Expose base image digests
touch $(results.BASE_IMAGES_DIGESTS.path)
for image in $BASE_IMAGES; do
if [ "${image}" != "scratch" ]; then
buildah images --format '{{ .Name }}:{{ .Tag }}@{{ .Digest }}' --filter reference="$image" >> $(results.BASE_IMAGES_DIGESTS.path)
Expand Down

0 comments on commit a2d37bc

Please sign in to comment.