Skip to content

Commit

Permalink
feat(cli): Added example to --help output for context (argoproj#15809)
Browse files Browse the repository at this point in the history
* docs: fix list format (argoproj#15798)

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Signed-off-by: sagarwala1 <shailja_agarwala@intuit.com>

* fix(appset): add option to disable SCM providers entirely (argoproj#14246) (argoproj#15248)

* feat(appset): add option to disable SCM providers entirely (argoproj#14246)

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* clarify docs

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* more clarification, small refactor

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* more clarification

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* fix test

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* refactor

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* fix test assertion

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* simplify test expectation

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

---------

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Co-authored-by: Ishita Sequeira <46771830+ishitasequeira@users.noreply.github.com>
Signed-off-by: sagarwala1 <shailja_agarwala@intuit.com>

* add context example to help

Signed-off-by: sagarwala1 <shailja_agarwala@intuit.com>

* add context example to help Signed-off-by: sagarwala

Signed-off-by: sagarwala1 <shailja_agarwala@intuit.com>

* fea(cli)t: Add example to --help output for "argocd appset get" (argoproj#15808)

Signed-off-by: Michele Caci <michele.caci@gmail.com>
Signed-off-by: sagarwala1 <shailja_agarwala@intuit.com>

* fix: codeowners syntax error (argoproj#15781)

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Co-authored-by: Ishita Sequeira <46771830+ishitasequeira@users.noreply.github.com>
Signed-off-by: sagarwala1 <shailja_agarwala@intuit.com>

* Trigger checks again Signed-off-by: sagarwala1 <shailja_agarwala@intuit.com>

Signed-off-by: sagarwala1 <shailja_agarwala@intuit.com>

---------

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Signed-off-by: sagarwala1 <shailja_agarwala@intuit.com>
Signed-off-by: Michele Caci <michele.caci@gmail.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Co-authored-by: Ishita Sequeira <46771830+ishitasequeira@users.noreply.github.com>
Co-authored-by: Michele Caci <michele.caci@gmail.com>
  • Loading branch information
4 people authored and lukaszgyg committed Jan 12, 2024
1 parent 7f64702 commit 8636acc
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cmd/argocd/commands/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@ func NewContextCommand(clientOpts *argocdclient.ClientOptions) *cobra.Command {
Use: "context [CONTEXT]",
Aliases: []string{"ctx"},
Short: "Switch between contexts",
Example: `# List Argo CD Contexts
argocd context
# Switch Argo CD context
argocd context cd.argoproj.io
# Delete Argo CD context
argocd context cd.argoproj.io --delete`,
Run: func(c *cobra.Command, args []string) {

localCfg, err := localconfig.ReadLocalConfig(clientOpts.ConfigPath)
Expand Down
13 changes: 13 additions & 0 deletions docs/user-guide/commands/argocd_context.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,19 @@ Switch between contexts
argocd context [CONTEXT] [flags]
```

### Examples

```
# List Argo CD Contexts
argocd context
# Switch Argo CD context
argocd context cd.argoproj.io
# Delete Argo CD context
argocd context cd.argoproj.io --delete
```

### Options

```
Expand Down

0 comments on commit 8636acc

Please sign in to comment.