-
Notifications
You must be signed in to change notification settings - Fork 506
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
Add SBOM format flag to publish-release #3020
Conversation
pkg/announce/github_page.go
Outdated
@@ -109,6 +110,7 @@ type SBOMOptions struct { | |||
Repo string | |||
RepoDirectory string | |||
Tag string // Version Tag | |||
Format string // "tag-value" | "json" |
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.
Nit: make it an enum.
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.
You mean in the cobra inputs? Or how would you do it?
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.
I mean making the options constants, like there:
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.
Ah got it, I've const'ed the values and wired them through the options.
/test pull-release-test |
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.
Just one more nit, otherwise LGTM
pkg/announce/github_page.go
Outdated
type SBOMFormat string | ||
|
||
const ( | ||
FormatJSON = "json" |
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.
FormatJSON = "json" | |
FormatJSON SBOMFormat = "json" |
Or avoid the type SBOMFormat
at all and stick to strings.
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.
Ugh good catch, I kept it because I think we may have to use other string values as we wire the format deeper.
Thanks!
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.
/lgtm
/hold for @saschagrunert
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.
/unhold
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cpanato, puerco, saschagrunert The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest |
/test pull-release-test |
What type of PR is this?
/kind feature
What this PR does / why we need it:
This PR adds a new flag to
publish-release github
to control the format of the generated SBOM and to use JSON as the default.It also adds targets to the repo Makefile to build publish release along with
release-notes
.Which issue(s) this PR fixes:
2nd commit related to #1987
Special notes for your reviewer:
/assign @cpanato
Does this PR introduce a user-facing change?