Skip to content

Commit

Permalink
Ensure that /shared/base_images_digests exists
Browse files Browse the repository at this point in the history
When there are no base images (i.e. it is FROM scratch), we need to make
sure that the base_images_digests file exists.

Signed-off-by: arewm <[email protected]>
  • Loading branch information
arewm committed Jul 25, 2024
1 parent 5004c6a commit f1af770
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.2/buildah-oci-ta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,7 @@ spec:
cp /tmp/cachi2/output/bom.json ./sbom-cachi2.json
fi
touch /shared/base_images_digests
for image in $BASE_IMAGES; do
if [ "${image}" != "scratch" ]; then
buildah images --format '{{ .Name }}:{{ .Tag }}@{{ .Digest }}' --filter reference="$image" >>/shared/base_images_digests
Expand Down
1 change: 1 addition & 0 deletions task/buildah-remote-oci-ta/0.2/buildah-remote-oci-ta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,7 @@ spec:
cp /tmp/cachi2/output/bom.json ./sbom-cachi2.json
fi
touch /shared/base_images_digests
for image in $BASE_IMAGES; do
if [ "${image}" != "scratch" ]; then
buildah images --format '{{ .Name }}:{{ .Tag }}@{{ .Digest }}' --filter reference="$image" >>/shared/base_images_digests
Expand Down
1 change: 1 addition & 0 deletions task/buildah-remote/0.2/buildah-remote.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,7 @@ spec:
cp /tmp/cachi2/output/bom.json ./sbom-cachi2.json
fi
touch /shared/base_images_digests
for image in $BASE_IMAGES; do
if [ "${image}" != "scratch" ]; then
buildah images --format '{{ .Name }}:{{ .Tag }}@{{ .Digest }}' --filter reference="$image" >> /shared/base_images_digests
Expand Down
1 change: 1 addition & 0 deletions task/buildah/0.2/buildah.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,7 @@ spec:
cp /tmp/cachi2/output/bom.json ./sbom-cachi2.json
fi
touch /shared/base_images_digests
for image in $BASE_IMAGES; do
if [ "${image}" != "scratch" ]; then
buildah images --format '{{ .Name }}:{{ .Tag }}@{{ .Digest }}' --filter reference="$image" >> /shared/base_images_digests
Expand Down

0 comments on commit f1af770

Please sign in to comment.