Skip to content

Commit

Permalink
test: fix failing nightly test
Browse files Browse the repository at this point in the history
With latest stacker-bom (v0.0.7) included, all bom enabled layers must
set their annotations.

Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
  • Loading branch information
rchincha committed May 10, 2024
1 parent 98ca66e commit 2d71bd2
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions test/bom.bats
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,27 @@ first:
touch /pkg1/file
mkdir -p /pkg2
touch /pkg2/file
annotations:
org.opencontainers.image.authors: bom-test
org.opencontainers.image.vendor: bom-test
org.opencontainers.image.licenses: MIT
EOF
stacker build --substitute CENTOS_OCI=${CENTOS_OCI}
# a full inventory for this image
[ -f .stacker/artifacts/second/inventory.json ]
# sbom for this image
[ -f .stacker/artifacts/second/second.json ]
if [ -n "${ZOT_HOST}:${ZOT_PORT}" ]; then
zot_setup
stacker publish --skip-tls --url docker://${ZOT_HOST}:${ZOT_PORT} --tag latest --substitute CENTOS_OCI=${CENTOS_OCI}
refs=$(regctl artifact tree ${ZOT_HOST}:${ZOT_PORT}/second:latest --format "{{json .}}" | jq '.referrer | length')
[ $refs -eq 2 ]
refs=$(regctl artifact get --subject ${ZOT_HOST}:${ZOT_PORT}/second:latest --filter-artifact-type "application/spdx+json" | jq '.SPDXID')
[ $refs == \"SPDXRef-DOCUMENT\" ]
zot_teardown
fi
stacker clean
}

second:
from:
Expand Down

0 comments on commit 2d71bd2

Please sign in to comment.