Skip to content
Merged
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
22 changes: 19 additions & 3 deletions cmd/registry/list/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,17 @@ import (

func New(runtimeContext *runtime.Context) *cobra.Command {
return &cobra.Command{
Use: "list",
Short: "Lists available workflow registries for the current environment",
Long: `Displays the registries configured for your organization, including type and address.`,
Use: "list",
Short: "Lists available workflow registries for the current environment",
Long: `Displays the registries configured for your organization, including type and address.

The ID shown for each registry is the value you set in workflow.yaml
under the ` + "`deployment-registry`" + ` key to target that registry, e.g.:

<target-name>:
user-workflow:
workflow-name: "my-workflow"
deployment-registry: "private"`,
Example: `cre registry list`,
Args: cobra.NoArgs,
RunE: func(cmd *cobra.Command, args []string) error {
Expand Down Expand Up @@ -41,6 +49,14 @@ func New(runtimeContext *runtime.Context) *cobra.Command {
ui.Line()
}

ui.Bold("Targeting a registry")
ui.Dim("Set `deployment-registry` in your workflow.yaml to one of the IDs above:")
ui.Line()
ui.Code(" <target-name>:")
ui.Code(" user-workflow:")
ui.Code(fmt.Sprintf(" deployment-registry: %q", registries[0].ID))
ui.Line()

return nil
},
}
Expand Down
8 changes: 8 additions & 0 deletions docs/cre_registry_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ Lists available workflow registries for the current environment

Displays the registries configured for your organization, including type and address.

The ID shown for each registry is the value you set in workflow.yaml
under the `deployment-registry` key to target that registry, e.g.:

<target-name>:
user-workflow:
workflow-name: "my-workflow"
deployment-registry: "private"

```
cre registry list [optional flags]
```
Expand Down
Loading