Skip to content
This repository was archived by the owner on Mar 16, 2024. It is now read-only.

Commit 45201d7

Browse files
authored
Merge pull request #2123 from tylerslaton/hide-image-very-and-sign
Hide image verify/sign subcommands and hide -s, -k, -a push flags
2 parents dfc7bab + bd8ed75 commit 45201d7

File tree

7 files changed

+6
-95
lines changed

7 files changed

+6
-95
lines changed

docs/docs/100-reference/01-command-line/acorn_image.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,4 @@ acorn images
4343
* [acorn image copy](acorn_image_copy.md) - Copy Acorn images between registries
4444
* [acorn image details](acorn_image_details.md) - Show details of an Image
4545
* [acorn image rm](acorn_image_rm.md) - Delete an Image
46-
* [acorn image sign](acorn_image_sign.md) - Sign an Image
47-
* [acorn image verify](acorn_image_verify.md) - Verify Image Signatures
4846

docs/docs/100-reference/01-command-line/acorn_image_sign.md

Lines changed: 0 additions & 39 deletions
This file was deleted.

docs/docs/100-reference/01-command-line/acorn_image_verify.md

Lines changed: 0 additions & 47 deletions
This file was deleted.

docs/docs/100-reference/01-command-line/acorn_push.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@ acorn push [flags] IMAGE
1212
### Options
1313

1414
```
15-
-h, --help help for push
16-
-k, --key string Key to use for signing (default "./cosign.key")
17-
-s, --sign Sign the image before pushing
18-
-a, --signature-annotation strings Annotations to add to the signature
15+
-h, --help help for push
1916
```
2017

2118
### Options inherited from parent commands

pkg/cli/images_sign.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ func NewImageSign(c CommandContext) *cobra.Command {
2828
Short: "Sign an Image",
2929
ValidArgsFunction: newCompletion(c.ClientFactory, imagesCompletion(true)).complete,
3030
Args: cobra.ExactArgs(1),
31+
Hidden: true,
3132
})
3233
_ = cmd.MarkFlagFilename("key")
3334
return cmd

pkg/cli/images_verify.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ acorn image verify my-image --key acorn://ibuildthecloud
2828
Short: "Verify Image Signatures",
2929
ValidArgsFunction: newCompletion(c.ClientFactory, imagesCompletion(true)).complete,
3030
Args: cobra.ExactArgs(1),
31+
Hidden: true,
3132
})
3233
_ = cmd.MarkFlagFilename("key")
3334
return cmd

pkg/cli/push.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ func NewPush(c CommandContext) *cobra.Command {
2020

2121
type Push struct {
2222
client ClientFactory
23-
Sign bool `usage:"Sign the image before pushing" short:"s" local:"true" default:"false"`
24-
Key string `usage:"Key to use for signing" short:"k" local:"true" default:"./cosign.key"`
25-
SignatureAnnotations map[string]string `usage:"Annotations to add to the signature" short:"a" local:"true" name:"signature-annotation"`
23+
Sign bool `hidden:"true" usage:"Sign the image before pushing" short:"s" local:"true" default:"false" `
24+
Key string `hidden:"true" usage:"Key to use for signing" short:"k" local:"true" default:"./cosign.key"`
25+
SignatureAnnotations map[string]string `hidden:"true" usage:"Annotations to add to the signature" short:"a" local:"true" name:"signature-annotation"`
2626
}
2727

2828
func (s *Push) Run(cmd *cobra.Command, args []string) error {

0 commit comments

Comments
 (0)