Skip to content

Commit

Permalink
docs: Add generated argocd command docs (argoproj#4606)
Browse files Browse the repository at this point in the history
  • Loading branch information
wtam2018 authored Oct 20, 2020
1 parent 90227f2 commit 894f95d
Show file tree
Hide file tree
Showing 105 changed files with 4,799 additions and 28 deletions.
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,12 @@ clientgen:
export GO111MODULE=off
./hack/update-codegen.sh

.PHONY: clidocsgen
clidocsgen:
go run tools/cmd-docs/main.go

.PHONY: codegen-local
codegen-local: mod-vendor-local gogen protogen clientgen openapigen manifests-local
codegen-local: mod-vendor-local gogen protogen clientgen openapigen clidocsgen manifests-local
rm -rf vendor/

.PHONY: codegen
Expand Down
54 changes: 27 additions & 27 deletions assets/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
"tags": [
"AccountService"
],
"operationId": "CreateToken",
"operationId": "CreateTokenMixin7",
"parameters": [
{
"type": "string",
Expand Down Expand Up @@ -152,7 +152,7 @@
"tags": [
"AccountService"
],
"operationId": "DeleteToken",
"operationId": "DeleteTokenMixin7",
"parameters": [
{
"type": "string",
Expand Down Expand Up @@ -183,7 +183,7 @@
"ApplicationService"
],
"summary": "List returns list of applications",
"operationId": "List",
"operationId": "ListMixin10",
"parameters": [
{
"type": "string",
Expand Down Expand Up @@ -234,7 +234,7 @@
"ApplicationService"
],
"summary": "Create creates an application",
"operationId": "Create",
"operationId": "CreateMixin10",
"parameters": [
{
"name": "body",
Expand All @@ -261,7 +261,7 @@
"ApplicationService"
],
"summary": "Update updates an application",
"operationId": "Update",
"operationId": "UpdateMixin10",
"parameters": [
{
"type": "string",
Expand Down Expand Up @@ -393,7 +393,7 @@
"ApplicationService"
],
"summary": "Get returns an application by name",
"operationId": "Get",
"operationId": "GetMixin10",
"parameters": [
{
"type": "string",
Expand Down Expand Up @@ -445,7 +445,7 @@
"ApplicationService"
],
"summary": "Delete deletes an application",
"operationId": "Delete",
"operationId": "DeleteMixin10",
"parameters": [
{
"type": "string",
Expand Down Expand Up @@ -1153,7 +1153,7 @@
"ClusterService"
],
"summary": "List returns list of clusters",
"operationId": "ListMixin3",
"operationId": "ListMixin1",
"parameters": [
{
"type": "string",
Expand All @@ -1180,7 +1180,7 @@
"ClusterService"
],
"summary": "Create creates a cluster",
"operationId": "CreateMixin3",
"operationId": "CreateMixin1",
"parameters": [
{
"name": "body",
Expand All @@ -1207,7 +1207,7 @@
"ClusterService"
],
"summary": "Update updates a cluster",
"operationId": "UpdateMixin3",
"operationId": "Update",
"parameters": [
{
"type": "string",
Expand Down Expand Up @@ -1241,7 +1241,7 @@
"ClusterService"
],
"summary": "Get returns a cluster by server address",
"operationId": "GetMixin3",
"operationId": "GetMixin1",
"parameters": [
{
"type": "string",
Expand Down Expand Up @@ -1269,7 +1269,7 @@
"ClusterService"
],
"summary": "Delete deletes a cluster",
"operationId": "DeleteMixin3",
"operationId": "DeleteMixin1",
"parameters": [
{
"type": "string",
Expand Down Expand Up @@ -1349,7 +1349,7 @@
"GPGKeyService"
],
"summary": "List all available repository certificates",
"operationId": "ListMixin4",
"operationId": "List",
"parameters": [
{
"type": "string",
Expand All @@ -1372,7 +1372,7 @@
"GPGKeyService"
],
"summary": "Create one or more GPG public keys in the server's configuration",
"operationId": "CreateMixin4",
"operationId": "Create",
"parameters": [
{
"description": "Raw key data of the GPG key(s) to create",
Expand All @@ -1398,7 +1398,7 @@
"GPGKeyService"
],
"summary": "Delete specified GPG public key from the server's configuration",
"operationId": "DeleteMixin4",
"operationId": "Delete",
"parameters": [
{
"type": "string",
Expand All @@ -1423,7 +1423,7 @@
"GPGKeyService"
],
"summary": "Get information about specified GPG public key from the server",
"operationId": "GetMixin4",
"operationId": "Get",
"parameters": [
{
"type": "string",
Expand All @@ -1449,7 +1449,7 @@
"ProjectService"
],
"summary": "List returns list of projects",
"operationId": "ListMixin5",
"operationId": "ListMixin6",
"parameters": [
{
"type": "string",
Expand All @@ -1471,7 +1471,7 @@
"ProjectService"
],
"summary": "Create a new project.",
"operationId": "CreateMixin5",
"operationId": "CreateMixin6",
"parameters": [
{
"name": "body",
Expand All @@ -1498,7 +1498,7 @@
"ProjectService"
],
"summary": "Get returns a project by name",
"operationId": "GetMixin5",
"operationId": "GetMixin6",
"parameters": [
{
"type": "string",
Expand All @@ -1521,7 +1521,7 @@
"ProjectService"
],
"summary": "Delete deletes a project",
"operationId": "DeleteMixin5",
"operationId": "DeleteMixin6",
"parameters": [
{
"type": "string",
Expand Down Expand Up @@ -1596,7 +1596,7 @@
"ProjectService"
],
"summary": "Update updates a project",
"operationId": "UpdateMixin5",
"operationId": "UpdateMixin6",
"parameters": [
{
"type": "string",
Expand Down Expand Up @@ -1630,7 +1630,7 @@
"ProjectService"
],
"summary": "Create a new project token.",
"operationId": "CreateTokenMixin5",
"operationId": "CreateToken",
"parameters": [
{
"type": "string",
Expand Down Expand Up @@ -1669,7 +1669,7 @@
"ProjectService"
],
"summary": "Delete a new project token.",
"operationId": "DeleteTokenMixin5",
"operationId": "DeleteToken",
"parameters": [
{
"type": "string",
Expand Down Expand Up @@ -1914,7 +1914,7 @@
"RepositoryService"
],
"summary": "Get returns a repository or its credentials",
"operationId": "GetMixin7",
"operationId": "GetMixin2",
"parameters": [
{
"type": "string",
Expand Down Expand Up @@ -2109,7 +2109,7 @@
"SessionService"
],
"summary": "Create a new JWT for authentication and set a cookie if using HTTP.",
"operationId": "CreateMixin8",
"operationId": "CreateMixin11",
"parameters": [
{
"name": "body",
Expand All @@ -2134,7 +2134,7 @@
"SessionService"
],
"summary": "Delete an existing JWT cookie if using HTTP.",
"operationId": "DeleteMixin8",
"operationId": "DeleteMixin11",
"responses": {
"200": {
"description": "A successful response.",
Expand Down Expand Up @@ -2168,7 +2168,7 @@
"SettingsService"
],
"summary": "Get returns Argo CD settings",
"operationId": "GetMixin10",
"operationId": "GetMixin4",
"responses": {
"200": {
"description": "A successful response.",
Expand Down
1 change: 1 addition & 0 deletions cmd/argocd/commands/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ func NewCommand() *cobra.Command {
Run: func(c *cobra.Command, args []string) {
c.HelpFunc()(c, args)
},
DisableAutoGenTag: true,
}

command.AddCommand(NewCompletionCommand())
Expand Down
50 changes: 50 additions & 0 deletions docs/user-guide/commands/argocd.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
## argocd

argocd controls a Argo CD server

### Synopsis

argocd controls a Argo CD server

```
argocd [flags]
```

### Options

```
--auth-token string Authentication token
--client-crt string Client certificate file
--client-crt-key string Client certificate key file
--config string Path to Argo CD config (default "/home/user/.argocd/config")
--grpc-web Enables gRPC-web protocol. Useful if Argo CD server is behind proxy which does not support HTTP2.
--grpc-web-root-path string Enables gRPC-web protocol. Useful if Argo CD server is behind proxy which does not support HTTP2. Set web root.
-H, --header strings Sets additional header to all requests made by Argo CD CLI. (Can be repeated multiple times to add multiple headers, also supports comma separated headers)
-h, --help help for argocd
--insecure Skip server certificate and domain verification
--logformat string Set the logging format. One of: text|json (default "text")
--loglevel string Set the logging level. One of: debug|info|warn|error (default "info")
--plaintext Disable TLS
--port-forward Connect to a random argocd-server port using port forwarding
--port-forward-namespace string Namespace name which should be used for port forwarding
--server string Argo CD server address
--server-crt string Server certificate file
```

### SEE ALSO

* [argocd account](argocd_account.md) - Manage account settings
* [argocd app](argocd_app.md) - Manage applications
* [argocd cert](argocd_cert.md) - Manage repository certificates and SSH known hosts entries
* [argocd cluster](argocd_cluster.md) - Manage cluster credentials
* [argocd completion](argocd_completion.md) - output shell completion code for the specified shell (bash or zsh)
* [argocd context](argocd_context.md) - Switch between contexts
* [argocd gpg](argocd_gpg.md) - Manage GPG keys used for signature verification
* [argocd login](argocd_login.md) - Log in to Argo CD
* [argocd logout](argocd_logout.md) - Log out from Argo CD
* [argocd proj](argocd_proj.md) - Manage projects
* [argocd relogin](argocd_relogin.md) - Refresh an expired authenticate token
* [argocd repo](argocd_repo.md) - Manage repository connection parameters
* [argocd repocreds](argocd_repocreds.md) - Manage repository connection parameters
* [argocd version](argocd_version.md) - Print version information

49 changes: 49 additions & 0 deletions docs/user-guide/commands/argocd_account.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
## argocd account

Manage account settings

### Synopsis

Manage account settings

```
argocd account [flags]
```

### Options

```
-h, --help help for account
```

### Options inherited from parent commands

```
--auth-token string Authentication token
--client-crt string Client certificate file
--client-crt-key string Client certificate key file
--config string Path to Argo CD config (default "/home/user/.argocd/config")
--grpc-web Enables gRPC-web protocol. Useful if Argo CD server is behind proxy which does not support HTTP2.
--grpc-web-root-path string Enables gRPC-web protocol. Useful if Argo CD server is behind proxy which does not support HTTP2. Set web root.
-H, --header strings Sets additional header to all requests made by Argo CD CLI. (Can be repeated multiple times to add multiple headers, also supports comma separated headers)
--insecure Skip server certificate and domain verification
--logformat string Set the logging format. One of: text|json (default "text")
--loglevel string Set the logging level. One of: debug|info|warn|error (default "info")
--plaintext Disable TLS
--port-forward Connect to a random argocd-server port using port forwarding
--port-forward-namespace string Namespace name which should be used for port forwarding
--server string Argo CD server address
--server-crt string Server certificate file
```

### SEE ALSO

* [argocd](argocd.md) - argocd controls a Argo CD server
* [argocd account can-i](argocd_account_can-i.md) - Can I
* [argocd account delete-token](argocd_account_delete-token.md) - Deletes account token
* [argocd account generate-token](argocd_account_generate-token.md) - Generate account token
* [argocd account get](argocd_account_get.md) - Get account details
* [argocd account get-user-info](argocd_account_get-user-info.md) - Get user info
* [argocd account list](argocd_account_list.md) - List accounts
* [argocd account update-password](argocd_account_update-password.md) - Update password

Loading

0 comments on commit 894f95d

Please sign in to comment.