Skip to content

Commit

Permalink
Add SBOM filter to allow image distribution
Browse files Browse the repository at this point in the history
Related to qualcomm-linux#40

Add post build filter to clear out generated SBOM files.

* Modify `ci/yocto-check-layer.sh` to include a step that uses the `find` command to locate and delete SBOM files.
* Update `ci/base.yml` to add a post build filter section that uses the `find` command to locate and delete SBOM files.
* Modify `.github/workflows/build-yocto.yml` to include a step that uses the `find` command to locate and delete SBOM files after the publish image step.
  • Loading branch information
vishwamartur committed Nov 5, 2024
1 parent 46f94bf commit d060292
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/build-yocto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,7 @@ jobs:
(( retries == i )) && { echo 'Failed to publish artifacts'; exit 1; }
echo Image available at: ${url}
- name: Clear out the generated SBOM files
run: |
find $TOPDIR -name "*.spdx" -type f -delete
5 changes: 5 additions & 0 deletions ci/base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,8 @@ local_conf_header:
INHERIT += "rm_work"
machine: unset

post_build_filter:
sbom_cleanup: |
# Clear out the generated SBOM files
find $TOPDIR -name "*.spdx" -type f -delete
3 changes: 3 additions & 0 deletions ci/yocto-check-layer.sh
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@ CMD="$CMD --dependency `pwd`/poky/meta `pwd`/meta-qcom"
CMD="$CMD --no-auto-dependency"

exec kas shell $TOPDIR/ci/base.yml --command "$CMD"

# Clear out the generated SBOM files
find $TOPDIR -name "*.spdx" -type f -delete

0 comments on commit d060292

Please sign in to comment.