Skip to content

Commit

Permalink
Add verification for CNAB bundles (#17)
Browse files Browse the repository at this point in the history
Add verification for CNAB bundles
  • Loading branch information
Radu M authored Aug 14, 2019
2 parents 5fca3c5 + eb13b61 commit 4c85865
Show file tree
Hide file tree
Showing 393 changed files with 55,201 additions and 462 deletions.
207 changes: 200 additions & 7 deletions Gopkg.lock

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

9 changes: 9 additions & 0 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@
name = "github.com/spf13/cobra"
version = "0.0.4"

[[constraint]]
name = "github.com/docker/cnab-to-oci"
source = "github.com/radu-matei/cnab-to-oci"
branch = "canonical"

[[constraint]]
name = "github.com/docker/distribution"
revision = "83389a148052d74ac602f5f1d62f86ff2f3c4aa5"

[prune]
go-tests = true
unused-packages = true
1 change: 1 addition & 0 deletions bundle.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"description":"A short description of your bundle","invocationImages":[{"image":"cnab/helloworld:0.1.1","imageType":"docker","size":42}],"keywords":["helloworld","cnab","tutorial"],"maintainers":[{"email":"[email protected]","name":"Jane Doe","url":"https://example.com"}],"name":"helloworld","schemaVersion":"v1.0.0-WD","version":"0.1.1"}
18 changes: 16 additions & 2 deletions cmd/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,24 @@ type listCmd struct {
}

func newListCmd() *cobra.Command {
const listDesc = `
Lists all targets for a given trust collection on a remote server.
Example:
$ signy list docker.io/library/alpine
3.5 66952b313e51c3bd1987d7c4ddf5dba9bc0fb6e524eed2448fa660246b3e76ec
3.8 04696b491e0cc3c58a75bace8941c14c924b9f313b03ce5029ebbc040ed9dcd9
3.2 e9a2035f9d0d7cee1cdd445f5bfa0c5c646455ee26f14565dce23cf2d2de7570
3.6 66790a2b79e1ea3e1dabac43990c54aca5d1ddf268d9a5a0285e4167c8b24475
3.10 6a92cd1fcdc8d8cdec60f33dda4db2cb1fcdcacf3410a8e05b3741f44a9b5998
3.9.4 7746df395af22f04212cd25a92c1d6dbc5a06a0ca9579a229ef43008d4d1302a
`
list := listCmd{}
cmd := &cobra.Command{
Use: "list",
Short: "Lists targets for a remote trusted collection",
Use: "list [GUN]",
Short: "Lists all targets for a given remote collection on a trust server.",
Long: listDesc,
Args: cobra.ExactArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
list.gun = args[0]
Expand Down
1 change: 1 addition & 0 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ func init() {
rootCmd.AddCommand(
newListCmd(),
newSignCmd(),
newVerifyCmd(),
)

rootCmd.PersistentFlags().StringVarP(&trustServer, "server", "", "https://notary.docker.io", "The trust server used")
Expand Down
Loading

0 comments on commit 4c85865

Please sign in to comment.