Skip to content

docs: improve doc for --no-upload option #4206

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions cmd/cosign/cli/attest.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ func Attest() *cobra.Command {
# supply attestation via stdin
echo <PAYLOAD> | cosign attest --predicate - <IMAGE>

# write attestation to stdout
cosign attest --predicate <FILE> --type <TYPE> --key cosign.key --no-upload true <IMAGE>

# attach an attestation to a container image and honor the creation timestamp of the signature
cosign attest --predicate <FILE> --type <TYPE> --key cosign.key --record-creation-timestamp <IMAGE>`,

Expand Down
3 changes: 1 addition & 2 deletions cmd/cosign/cli/options/attest.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@ func (o *AttestOptions) AddFlags(cmd *cobra.Command) {
_ = cmd.MarkFlagFilename("certificate-chain", certificateExts...)

cmd.Flags().BoolVar(&o.NoUpload, "no-upload", false,
"do not upload the generated attestation")

"do not upload the generated attestation, but send the attestation output to STDOUT")
cmd.Flags().BoolVarP(&o.Replace, "replace", "", false,
"")

Expand Down
5 changes: 4 additions & 1 deletion doc/cosign_attest.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.