Skip to content

Commit

Permalink
feat: Add examples to --help output for "generate-spec PROJECT" (argo…
Browse files Browse the repository at this point in the history
…proj#15871)

* feat: Add examples to --help output for get APPNAME

Signed-off-by: Ratan Gulati <ratangulati.dev@gmail.com>

* feat: Add examples to --help output for get APPNAME

Signed-off-by: Ratan Gulati <ratangulati.dev@gmail.com>

* Update app.go

Signed-off-by: Ratan Gulati <ratangulati.dev@gmail.com>

* Update argocd_app_get.md

Signed-off-by: Ratan Gulati <ratangulati.dev@gmail.com>

* feat(cli): Add examples to --help output for generate-spec PROJECT

Signed-off-by: Ratan Gulati <ratangulati.dev@gmail.com>

* feat(cli): Add examples to --help output for generate-spec PROJECT

Signed-off-by: Ratan Gulati <ratangulati.dev@gmail.com>

* feat(cli): Add examples to --help output for generate-spec PROJECT

Signed-off-by: Ratan Gulati <ratangulati.dev@gmail.com>

* feat: Add examples to --help output for all "argocd proj" cmds (argoproj#15824)

Signed-off-by: Michele Caci <michele.caci@gmail.com>
Signed-off-by: Ratan Gulati <ratangulati.dev@gmail.com>

* chore(deps): bump gitops-engine (argoproj#15736)

* chore(deps): bump gitops-engine

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

* go mod tidy

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: Ratan Gulati <ratangulati.dev@gmail.com>

* feat(cli): Add example to argocd relogin command (argoproj#15839)

* feat: Add example to argocd relogin command

Signed-off-by: Chiranjeevi R <chiranjeevi.ramanatha@gmail.com>

* feat: Add example to argocd relogin command

Signed-off-by: Chiranjeevi R <chiranjeevi.ramanatha@gmail.com>

* correc --sso flag

Signed-off-by: Chiranjeevi R <chiranjeevi.ramanatha@gmail.com>

* Apply suggestions from code review

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

---------

Signed-off-by: Chiranjeevi R <chiranjeevi.ramanatha@gmail.com>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Signed-off-by: Ratan Gulati <ratangulati.dev@gmail.com>

* test(e2e): allow build of argocd-e2e-cluster image for remote tests (argoproj#15805)

* chore: allow build of argocd-e2e-cluster image for remote testing

Signed-off-by: Chris Fry <christopherfry@google.com>

* Retrigger CI pipeline

Signed-off-by: Chris Fry <christopherfry@google.com>

---------

Signed-off-by: Chris Fry <christopherfry@google.com>
Signed-off-by: Ratan Gulati <ratangulati.dev@gmail.com>

* feat: Add examples to --help output for get APPNAME

Signed-off-by: Ratan Gulati <ratangulati.dev@gmail.com>

* feat: Add examples to --help output for get APPNAME

Signed-off-by: Ratan Gulati <ratangulati.dev@gmail.com>

* Update app.go

Signed-off-by: Ratan Gulati <ratangulati.dev@gmail.com>

* Update argocd_app_get.md

Signed-off-by: Ratan Gulati <ratangulati.dev@gmail.com>

* feat(cli): Add examples to --help output for generate-spec PROJECT

Signed-off-by: Ratan Gulati <ratangulati.dev@gmail.com>

* feat(cli): Add examples to --help output for generate-spec PROJECT

Signed-off-by: Ratan Gulati <ratangulati.dev@gmail.com>

* feat(cli): Add examples to --help output for generate-spec PROJECT

Signed-off-by: Ratan Gulati <ratangulati.dev@gmail.com>

* docs: clarify health inheritance (argoproj#15799)

* docs: resource health inheritance

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

* write more better

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

---------

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

---------

Signed-off-by: Ratan Gulati <ratangulati.dev@gmail.com>
Signed-off-by: Michele Caci <michele.caci@gmail.com>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Signed-off-by: Chiranjeevi R <chiranjeevi.ramanatha@gmail.com>
Signed-off-by: Chris Fry <christopherfry@google.com>
Co-authored-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: Chiranjeevi R <96932059+chiranjeevir-git@users.noreply.github.com>
Co-authored-by: Christopher Fry <ChristopherFry2008@gmail.com>
Signed-off-by: jmilic1 <70441727+jmilic1@users.noreply.github.com>
  • Loading branch information
6 people authored and jmilic1 committed Nov 13, 2023
1 parent 28c4250 commit b7cc338
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
12 changes: 12 additions & 0 deletions cmd/argocd/commands/admin/project.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
"github.com/argoproj/argo-cd/v2/util/cli"
"github.com/argoproj/argo-cd/v2/util/errors"
"github.com/argoproj/argo-cd/v2/util/io"
"github.com/argoproj/argo-cd/v2/util/templates"

"github.com/argoproj/gitops-engine/pkg/utils/kube"
"github.com/spf13/cobra"
Expand Down Expand Up @@ -47,6 +48,17 @@ func NewGenProjectSpecCommand() *cobra.Command {
var command = &cobra.Command{
Use: "generate-spec PROJECT",
Short: "Generate declarative config for a project",
Example: templates.Examples(`
# Generate a YAML configuration for a project named "myproject"
argocd admin projects generate-spec myproject
# Generate a JSON configuration for a project named "anotherproject" and specify an output file
argocd admin projects generate-spec anotherproject --output json --file config.json
# Generate a YAML configuration for a project named "someproject" and write it back to the input file
argocd admin projects generate-spec someproject --inline
`),

Run: func(c *cobra.Command, args []string) {
proj, err := cmdutil.ConstructAppProj(fileURL, args, opts, c)
errors.CheckError(err)
Expand Down
13 changes: 13 additions & 0 deletions docs/user-guide/commands/argocd_admin_proj_generate-spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,19 @@ Generate declarative config for a project
argocd admin proj generate-spec PROJECT [flags]
```

### Examples

```
# Generate a YAML configuration for a project named "myproject"
argocd admin projects generate-spec myproject
# Generate a JSON configuration for a project named "anotherproject" and specify an output file
argocd admin projects generate-spec anotherproject --output json --file config.json
# Generate a YAML configuration for a project named "someproject" and write it back to the input file
argocd admin projects generate-spec someproject --inline
```

### Options

```
Expand Down

0 comments on commit b7cc338

Please sign in to comment.