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

Commit

Permalink
Hide image verify/sign subcommands and hide --s, -k, -a push flags
Browse files Browse the repository at this point in the history
Signed-off-by: tylerslaton <mtslaton1@gmail.com>
  • Loading branch information
tylerslaton committed Aug 25, 2023
1 parent be49d0b commit bd8ed75
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 95 deletions.
2 changes: 0 additions & 2 deletions docs/docs/100-reference/01-command-line/acorn_image.md
Expand Up @@ -43,6 +43,4 @@ acorn images
* [acorn image copy](acorn_image_copy.md) - Copy Acorn images between registries
* [acorn image details](acorn_image_details.md) - Show details of an Image
* [acorn image rm](acorn_image_rm.md) - Delete an Image
* [acorn image sign](acorn_image_sign.md) - Sign an Image
* [acorn image verify](acorn_image_verify.md) - Verify Image Signatures

39 changes: 0 additions & 39 deletions docs/docs/100-reference/01-command-line/acorn_image_sign.md

This file was deleted.

47 changes: 0 additions & 47 deletions docs/docs/100-reference/01-command-line/acorn_image_verify.md

This file was deleted.

5 changes: 1 addition & 4 deletions docs/docs/100-reference/01-command-line/acorn_push.md
Expand Up @@ -12,10 +12,7 @@ acorn push [flags] IMAGE
### Options

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

### Options inherited from parent commands
Expand Down
1 change: 1 addition & 0 deletions pkg/cli/images_sign.go
Expand Up @@ -28,6 +28,7 @@ func NewImageSign(c CommandContext) *cobra.Command {
Short: "Sign an Image",
ValidArgsFunction: newCompletion(c.ClientFactory, imagesCompletion(true)).complete,
Args: cobra.ExactArgs(1),
Hidden: true,
})
_ = cmd.MarkFlagFilename("key")
return cmd
Expand Down
1 change: 1 addition & 0 deletions pkg/cli/images_verify.go
Expand Up @@ -28,6 +28,7 @@ acorn image verify my-image --key acorn://ibuildthecloud
Short: "Verify Image Signatures",
ValidArgsFunction: newCompletion(c.ClientFactory, imagesCompletion(true)).complete,
Args: cobra.ExactArgs(1),
Hidden: true,
})
_ = cmd.MarkFlagFilename("key")
return cmd
Expand Down
6 changes: 3 additions & 3 deletions pkg/cli/push.go
Expand Up @@ -20,9 +20,9 @@ func NewPush(c CommandContext) *cobra.Command {

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

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

0 comments on commit bd8ed75

Please sign in to comment.