Skip to content

Commit

Permalink
docs(cli): add examples for argo archive list with option explanati…
Browse files Browse the repository at this point in the history
…ons (#13662)

Signed-off-by: leehosu <hosu4549@gmail.com>
Signed-off-by: l2h <hosu4549@gmail.com>
Co-authored-by: Anton Gilgur <4970083+agilgur5@users.noreply.github.com>
  • Loading branch information
leehosu and agilgur5 authored Sep 28, 2024
1 parent ef09d9f commit 5a2fa4e
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
12 changes: 12 additions & 0 deletions cmd/argo/commands/archive/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,18 @@ func NewListCommand() *cobra.Command {
command := &cobra.Command{
Use: "list",
Short: "list workflows in the archive",
Example: `# List all archived workflows:
argo archive list
# List all archived workflows fetched in chunks of 100:
argo archive list --chunk-size 100
# List all archived workflows in YAML format:
argo archive list -o yaml
# List archived workflows that have both labels:
argo archive list -l key1=value1,key2=value2
`,
Run: func(cmd *cobra.Command, args []string) {
ctx, apiClient := client.NewAPIClient(cmd.Context())
serviceClient, err := apiClient.NewArchivedWorkflowServiceClient()
Expand Down
17 changes: 17 additions & 0 deletions docs/cli/argo_archive_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,23 @@ list workflows in the archive
argo archive list [flags]
```

### Examples

```
# List all archived workflows:
argo archive list
# List all archived workflows fetched in chunks of 100:
argo archive list --chunk-size 100
# List all archived workflows in YAML format:
argo archive list -o yaml
# List archived workflows that have both labels:
argo archive list -l key1=value1,key2=value2
```

### Options

```
Expand Down

0 comments on commit 5a2fa4e

Please sign in to comment.