Skip to content

Commit

Permalink
Expose SBOM results from oci-copy task
Browse files Browse the repository at this point in the history
  • Loading branch information
ralphbean committed Jul 8, 2024
1 parent 1478c32 commit 04b5919
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion task/oci-copy/0.1/oci-copy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ spec:
name: IMAGE_DIGEST
- description: Repository where the artifact was pushed
name: IMAGE_URL
- description: Link to the SBOM blob pushed to the registry.
name: SBOM_BLOB_URL
stepTemplate:
env:
- name: OCI_COPY_FILE
Expand Down Expand Up @@ -209,7 +211,15 @@ spec:
- cyclonedx
- $(params.IMAGE)
workingDir: $(workspaces.source.path)

- name: report-sbom-url
image: quay.io/konflux-ci/yq:latest@sha256:974dea6375ee9df561ffd3baf994db2b61777a71f3bcf0050c5dca91ac9b3430
script: |
REPO=$(echo ${IMAGE} | awk -F ':' '{print $1}')
echo "Found that ${REPO} is the repository for ${IMAGE}"
SBOM_DIGEST=$(sha256sum sbom-cyclonedx.json | awk '{ print $1 }')
echo "Found that ${SBOM_DIGEST} is the SBOM digest"
echo -n "${REPO}@sha256:${SBOM_DIGEST}" | tee $(results.SBOM_BLOB_URL.path)
workingDir: $(workspaces.source.path)
volumes:
- emptyDir: {}
name: varlibcontainers
Expand Down

0 comments on commit 04b5919

Please sign in to comment.