Skip to content
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

Merged
merged 2 commits into from
May 31, 2023

Conversation

puerco
Copy link
Member

@puerco puerco commented Apr 17, 2023

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?

The SBOM format can now be controlled in `publish release github` and JSON is now the default.

@k8s-ci-robot k8s-ci-robot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Apr 17, 2023
@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-priority area/release-eng Issues or PRs related to the Release Engineering subproject approved Indicates a PR has been approved by an approver from all required OWNERS files. sig/release Categorizes an issue or PR as relevant to SIG Release. labels Apr 17, 2023
@k8s-ci-robot k8s-ci-robot requested review from jimangel and jrsapi April 17, 2023 11:03
@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Apr 17, 2023
@@ -109,6 +110,7 @@ type SBOMOptions struct {
Repo string
RepoDirectory string
Tag string // Version Tag
Format string // "tag-value" | "json"
Copy link
Member

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.

Copy link
Member Author

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?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

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.

@puerco
Copy link
Member Author

puerco commented Apr 18, 2023

/test pull-release-test

Copy link
Member

@saschagrunert saschagrunert left a 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

type SBOMFormat string

const (
FormatJSON = "json"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
FormatJSON = "json"
FormatJSON SBOMFormat = "json"

Or avoid the type SBOMFormat at all and stick to strings.

Copy link
Member Author

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!

Copy link
Member

@cpanato cpanato left a 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

@k8s-ci-robot k8s-ci-robot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. lgtm "Looks good to me", indicates that a PR is ready to be merged. labels Apr 25, 2023
Copy link
Member

@saschagrunert saschagrunert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/unhold

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 25, 2023
@k8s-ci-robot
Copy link
Contributor

[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:
  • OWNERS [cpanato,puerco,saschagrunert]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@saschagrunert
Copy link
Member

/retest

@puerco
Copy link
Member Author

puerco commented May 31, 2023

/test pull-release-test

@k8s-ci-robot k8s-ci-robot merged commit 90fe535 into kubernetes:master May 31, 2023
@k8s-ci-robot k8s-ci-robot added this to the v1.28 milestone May 31, 2023
@puerco puerco deleted the json-sbom branch May 31, 2023 04:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/release-eng Issues or PRs related to the Release Engineering subproject cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/release Categorizes an issue or PR as relevant to SIG Release. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants