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

doc: add examples in CLI help doc for notation sign and verify #384

Merged
merged 15 commits into from
Oct 14, 2022

Conversation

FeynmanZhou
Copy link
Member

fix #383

cmd/notation/verify.go Outdated Show resolved Hide resolved
cmd/notation/verify.go Outdated Show resolved Hide resolved
Copy link
Contributor

@yizha1 yizha1 left a comment

Choose a reason for hiding this comment

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

LGTM

cmd/notation/sign.go Outdated Show resolved Hide resolved
cmd/notation/sign.go Outdated Show resolved Hide resolved
cmd/notation/sign.go Outdated Show resolved Hide resolved
cmd/notation/common.go Outdated Show resolved Hide resolved
cmd/notation/verify.go Show resolved Hide resolved
cmd/notation/sign.go Show resolved Hide resolved
cmd/notation/verify.go Outdated Show resolved Hide resolved
@FeynmanZhou FeynmanZhou added this to the alpha-4 milestone Oct 13, 2022
@FeynmanZhou FeynmanZhou added documentation Improvements or additions to documentation UX User experience changes labels Oct 13, 2022
Copy link
Contributor

@priteshbandi priteshbandi left a comment

Choose a reason for hiding this comment

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

LGTM, we will update this command again in RC1

Comment on lines 38 to 39
Long: `
Prerequiste: a signing key needs to be configured using the command "notation key".
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you add a title for the help command? Otherwise, it will show

$ ./notation sign --help

Prerequiste: a signing key needs to be configured using the command "notation key".

Example - Sign a container image using the default signing key, with the default JWS envelope:
  notation sign <registry>/<repository>:<tag>

...

Copy link
Member Author

Choose a reason for hiding this comment

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

@shizhMSFT Good catch. Fixed.

Just be aware of the value in the Short field will be omitted when defines a Long field.

The current CLI help UX for notation sign:

 ./notation sign --help

Sign OCI artifacts

Prerequisite: a signing key needs to be configured using the command "notation key".

Example - Sign a container image using the default signing key, with the default JWS envelope:
  notation sign <registry>/<repository>:<tag>

Example - Sign a container image using the default signing key, with the COSE envelope:
  notation sign --envelope-type cose <registry>/<repository>:<tag>

Example - Sign a container image using the specified key name
  notation sign --key <key_name> <registry>/<repository>:<tag>

cmd/notation/sign.go Outdated Show resolved Hide resolved
cmd/notation/verify.go Outdated Show resolved Hide resolved
@FeynmanZhou FeynmanZhou requested a review from shizhMSFT October 14, 2022 03:00
Signed-off-by: Feynman Zhou <[email protected]>
@codecov-commenter
Copy link

Codecov Report

Merging #384 (8c3790f) into main (623fd6d) will increase coverage by 1.32%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #384      +/-   ##
==========================================
+ Coverage   30.70%   32.03%   +1.32%     
==========================================
  Files          26       26              
  Lines        1638     1670      +32     
==========================================
+ Hits          503      535      +32     
  Misses       1122     1122              
  Partials       13       13              
Impacted Files Coverage Δ
cmd/notation/common.go 100.00% <ø> (ø)
cmd/notation/sign.go 42.45% <100.00%> (+12.56%) ⬆️
cmd/notation/verify.go 26.89% <100.00%> (+8.96%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Contributor

@shizhMSFT shizhMSFT left a comment

Choose a reason for hiding this comment

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

LGTM

@shizhMSFT shizhMSFT merged commit b9f1fb5 into notaryproject:main Oct 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation UX User experience changes
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Add examples for notation command help doc
7 participants