-
-
Notifications
You must be signed in to change notification settings - Fork 1k
feat: allow passing sbomDir to KO #5688
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
A PR to add support for specifying a custom directory for writing SBOM files when using KO.
- Added a "sbom_dir" option in the YAML configuration documentation with a default of "out/sbom".
- Introduced a new SBOMDir field in the Go configuration structure.
- Updated the build options and corresponding tests to support passing the new SBOMDir option.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
File | Description |
---|---|
www/docs/customization/ko.md | Added documentation for the new "sbom_dir" parameter with explanation and default value. |
pkg/config/config.go | Extended the configuration struct to include the SBOMDir field. |
internal/pipe/ko/ko_test.go | Updated tests to include scenarios for the new SBOMDir parameter. |
internal/pipe/ko/ko.go | Modified the build options logic to include SBOMDir when set and "spdx" is used. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hey! thanks for the PR
have just a couple of minor remarks in the docs!
@@ -416,6 +416,7 @@ type Ko struct { | |||
CreationTime string `yaml:"creation_time,omitempty" json:"creation_time,omitempty"` | |||
KoDataCreationTime string `yaml:"ko_data_creation_time,omitempty" json:"ko_data_creation_time,omitempty"` | |||
SBOM string `yaml:"sbom,omitempty" json:"sbom,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO to me: add the valid options of this to the JSONSchema
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5688 +/- ##
==========================================
+ Coverage 83.01% 83.03% +0.02%
==========================================
Files 158 158
Lines 15564 15583 +19
==========================================
+ Hits 12920 12939 +19
Misses 2088 2088
Partials 556 556 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
…t/goreleaser into feat/sbomdir-for-ko
Thank you! |
This commit will allow passing the sbomDir option to KO.
From the KO documentation:
This is useful if you are creating prereleases/snapshots your sbom would be "lost" as it is only published to the local docker registry - and you might use gorelease/ko in your BuildPipelines without docker agent running.
refs https://github.com/orgs/goreleaser/discussions/5679
closes #5689