From 712db97b9d5f8c3026512fec364cbd5c3888c595 Mon Sep 17 00:00:00 2001 From: Bolaji Olajide <25608335+BolajiOlajide@users.noreply.github.com> Date: Wed, 15 Feb 2023 19:02:29 +0100 Subject: [PATCH] batches: bump src-cli constant for 4.5 release (#47670) --- doc/cli/references/code-intel/upload.md | 7 +- .../install.md => extensions/copy.md} | 31 ++++----- doc/cli/references/extensions/delete.md | 46 +++++++++++++ doc/cli/references/extensions/get.md | 46 +++++++++++++ doc/cli/references/extensions/index.md | 11 +++ doc/cli/references/extensions/list.md | 56 +++++++++++++++ doc/cli/references/extensions/publish.md | 69 +++++++++++++++++++ doc/cli/references/index.md | 2 +- doc/cli/references/repos/add-kvp.md | 49 +++++++++++++ doc/cli/references/repos/delete-kvp.md | 45 ++++++++++++ doc/cli/references/repos/update-kvp.md | 49 +++++++++++++ .../references/users/{clean.md => prune.md} | 21 +++--- doc/cli/references/validate.md | 27 ++++++++ doc/cli/references/validate/index.md | 7 -- doc/cli/references/validate/kube.md | 38 ---------- internal/src-cli/consts.go | 2 +- 16 files changed, 429 insertions(+), 77 deletions(-) rename doc/cli/references/{validate/install.md => extensions/copy.md} (73%) create mode 100644 doc/cli/references/extensions/delete.md create mode 100644 doc/cli/references/extensions/get.md create mode 100644 doc/cli/references/extensions/index.md create mode 100644 doc/cli/references/extensions/list.md create mode 100644 doc/cli/references/extensions/publish.md create mode 100644 doc/cli/references/repos/add-kvp.md create mode 100644 doc/cli/references/repos/delete-kvp.md create mode 100644 doc/cli/references/repos/update-kvp.md rename doc/cli/references/users/{clean.md => prune.md} (77%) create mode 100644 doc/cli/references/validate.md delete mode 100644 doc/cli/references/validate/index.md delete mode 100644 doc/cli/references/validate/kube.md diff --git a/doc/cli/references/code-intel/upload.md b/doc/cli/references/code-intel/upload.md index 434bf89de66..bd8d6556adc 100644 --- a/doc/cli/references/code-intel/upload.md +++ b/doc/cli/references/code-intel/upload.md @@ -7,7 +7,7 @@ |------|-------------|---------------| | `-associated-index-id` | ID of the associated index record for this upload. For internal use only. | `-1` | | `-commit` | The 40-character hash of the commit. Defaults to the currently checked-out commit. | | -| `-file` | The path to the LSIF dump file. | `./dump.lsif` | +| `-file` | The path to the LSIF dump file. | | | `-github-token` | A GitHub access token with 'public_repo' scope that Sourcegraph uses to verify you have access to the repository. | | | `-gitlab-token` | A GitLab access token with 'read_api' scope that Sourcegraph uses to verify you have access to the repository. | | | `-ignore-upload-failure` | Exit with status code zero on upload failure. | `false` | @@ -20,6 +20,7 @@ | `-open` | Open the LSIF upload page in your browser. | `false` | | `-repo` | The name of the repository (e.g. github.com/gorilla/mux). By default, derived from the origin remote. | | | `-root` | The path in the repository that matches the LSIF projectRoot (e.g. cmd/project1). Defaults to the directory where the dump file is located. | | +| `-skip-scip` | Skip converting LSIF index to SCIP if the instance supports it; this option should only used for debugging | `false` | | `-trace` | -trace=0 shows no logs; -trace=1 shows requests and response metadata; -trace=2 shows headers, -trace=3 shows response body | `0` | | `-upload-route` | The path of the upload route. For internal use only. | `/.api/lsif/upload` | @@ -33,7 +34,7 @@ Usage of 'src code-intel upload': -commit string The 40-character hash of the commit. Defaults to the currently checked-out commit. -file string - The path to the LSIF dump file. (default "./dump.lsif") + The path to the LSIF dump file. -github-token string A GitHub access token with 'public_repo' scope that Sourcegraph uses to verify you have access to the repository. -gitlab-token string @@ -58,6 +59,8 @@ Usage of 'src code-intel upload': The name of the repository (e.g. github.com/gorilla/mux). By default, derived from the origin remote. -root string The path in the repository that matches the LSIF projectRoot (e.g. cmd/project1). Defaults to the directory where the dump file is located. + -skip-scip + Skip converting LSIF index to SCIP if the instance supports it; this option should only used for debugging -trace int -trace=0 shows no logs; -trace=1 shows requests and response metadata; -trace=2 shows headers, -trace=3 shows response body -upload-route string diff --git a/doc/cli/references/validate/install.md b/doc/cli/references/extensions/copy.md similarity index 73% rename from doc/cli/references/validate/install.md rename to doc/cli/references/extensions/copy.md index f348a311633..c2a65ad733d 100644 --- a/doc/cli/references/validate/install.md +++ b/doc/cli/references/extensions/copy.md @@ -1,22 +1,29 @@ -# `src validate install` +# `src extensions copy` ## Flags | Name | Description | Default Value | |------|-------------|---------------| +| `-current-user` | The current user | | | `-dump-requests` | Log GraphQL requests and responses to stdout | `false` | +| `-extension-id` | The in https://sourcegraph.com/extensions/ (e.g. sourcegraph/java) | | | `-get-curl` | Print the curl command for executing this query and exit (WARNING: includes printing your access token!) | `false` | | `-insecure-skip-verify` | Skip validation of TLS certificates against trusted chains | `false` | | `-trace` | Log the trace ID for requests. See https://docs.sourcegraph.com/admin/observability/tracing | `false` | | `-user-agent-telemetry` | Include the operating system and architecture in the User-Agent sent with requests to Sourcegraph | `true` | + ## Usage ``` -Usage of 'src validate install': +Usage of 'src extensions copy': + -current-user string + The current user -dump-requests Log GraphQL requests and responses to stdout + -extension-id string + The in https://sourcegraph.com/extensions/ (e.g. sourcegraph/java) -get-curl Print the curl command for executing this query and exit (WARNING: includes printing your access token!) -insecure-skip-verify @@ -25,23 +32,9 @@ Usage of 'src validate install': Log the trace ID for requests. See https://docs.sourcegraph.com/admin/observability/tracing -user-agent-telemetry Include the operating system and architecture in the User-Agent sent with requests to Sourcegraph (default true) -'src validate install' is a tool that validates a Sourcegraph installation. -Examples: +Copy an extension from Sourcegraph.com to your private registry. - Run default checks: - $ src validate install - - Provide a YAML configuration file: - - $ src validate install config.yml - - Provide a JSON configuration file: - - $ src validate install config.json - -Environmental variables - - SRC_GITHUB_TOKEN GitHub access token for validation features -``` \ No newline at end of file +``` + \ No newline at end of file diff --git a/doc/cli/references/extensions/delete.md b/doc/cli/references/extensions/delete.md new file mode 100644 index 00000000000..2222034c8cd --- /dev/null +++ b/doc/cli/references/extensions/delete.md @@ -0,0 +1,46 @@ +# `src extensions delete` + + +## Flags + +| Name | Description | Default Value | +|------|-------------|---------------| +| `-dump-requests` | Log GraphQL requests and responses to stdout | `false` | +| `-get-curl` | Print the curl command for executing this query and exit (WARNING: includes printing your access token!) | `false` | +| `-id` | The ID (GraphQL API ID, not extension ID) of the extension to delete. | | +| `-insecure-skip-verify` | Skip validation of TLS certificates against trusted chains | `false` | +| `-trace` | Log the trace ID for requests. See https://docs.sourcegraph.com/admin/observability/tracing | `false` | +| `-user-agent-telemetry` | Include the operating system and architecture in the User-Agent sent with requests to Sourcegraph | `true` | + + +## Usage + +``` +Usage of 'src extensions delete': + -dump-requests + Log GraphQL requests and responses to stdout + -get-curl + Print the curl command for executing this query and exit (WARNING: includes printing your access token!) + -id string + The ID (GraphQL API ID, not extension ID) of the extension to delete. + -insecure-skip-verify + Skip validation of TLS certificates against trusted chains + -trace + Log the trace ID for requests. See https://docs.sourcegraph.com/admin/observability/tracing + -user-agent-telemetry + Include the operating system and architecture in the User-Agent sent with requests to Sourcegraph (default true) + +Examples: + + Delete the extension by ID (GraphQL API ID, not extension ID): + + $ src extensions delete -id=UmVnaXN0cnlFeHRlbnNpb246... + + Delete the extension with extension ID "alice/myextension": + + $ src extensions delete -id=$(src extensions get -f '{{.ID}}' -extension-id=alice/myextension) + + + +``` + \ No newline at end of file diff --git a/doc/cli/references/extensions/get.md b/doc/cli/references/extensions/get.md new file mode 100644 index 00000000000..869457bbbd7 --- /dev/null +++ b/doc/cli/references/extensions/get.md @@ -0,0 +1,46 @@ +# `src extensions get` + + +## Flags + +| Name | Description | Default Value | +|------|-------------|---------------| +| `-dump-requests` | Log GraphQL requests and responses to stdout | `false` | +| `-extension-id` | Look up extension by extension ID. (e.g. "alice/myextension") | | +| `-f` | Format for the output, using the syntax of Go package text/template. (e.g. "{{.ExtensionID}}: {{.Manifest.Title}} ({{.RemoteURL}})" or "{{.|json}}") | `{{.|json}}` | +| `-get-curl` | Print the curl command for executing this query and exit (WARNING: includes printing your access token!) | `false` | +| `-insecure-skip-verify` | Skip validation of TLS certificates against trusted chains | `false` | +| `-trace` | Log the trace ID for requests. See https://docs.sourcegraph.com/admin/observability/tracing | `false` | +| `-user-agent-telemetry` | Include the operating system and architecture in the User-Agent sent with requests to Sourcegraph | `true` | + + +## Usage + +``` +Usage of 'src extensions get': + -dump-requests + Log GraphQL requests and responses to stdout + -extension-id string + Look up extension by extension ID. (e.g. "alice/myextension") + -f string + Format for the output, using the syntax of Go package text/template. (e.g. "{{.ExtensionID}}: {{.Manifest.Title}} ({{.RemoteURL}})" or "{{.|json}}") (default "{{.|json}}") + -get-curl + Print the curl command for executing this query and exit (WARNING: includes printing your access token!) + -insecure-skip-verify + Skip validation of TLS certificates against trusted chains + -trace + Log the trace ID for requests. See https://docs.sourcegraph.com/admin/observability/tracing + -user-agent-telemetry + Include the operating system and architecture in the User-Agent sent with requests to Sourcegraph (default true) + +Examples: + + Get extension with extension ID "alice/myextension": + + $ src extensions get alice/myextension + $ src extensions get -extension-id=alice/myextension + + + +``` + \ No newline at end of file diff --git a/doc/cli/references/extensions/index.md b/doc/cli/references/extensions/index.md new file mode 100644 index 00000000000..dd22a0a7b8d --- /dev/null +++ b/doc/cli/references/extensions/index.md @@ -0,0 +1,11 @@ +# `src extensions` + +## Subcommands + + +* [`copy`](copy.md) +* [`delete`](delete.md) +* [`get`](get.md) +* [`list`](list.md) +* [`publish`](publish.md) + \ No newline at end of file diff --git a/doc/cli/references/extensions/list.md b/doc/cli/references/extensions/list.md new file mode 100644 index 00000000000..9885e2d07ab --- /dev/null +++ b/doc/cli/references/extensions/list.md @@ -0,0 +1,56 @@ +# `src extensions list` + + +## Flags + +| Name | Description | Default Value | +|------|-------------|---------------| +| `-dump-requests` | Log GraphQL requests and responses to stdout | `false` | +| `-f` | Format for the output, using the syntax of Go package text/template. (e.g. "{{.ExtensionID}}: {{.Manifest.Description}} ({{.RemoteURL}})" or "{{.|json}}") | `{{.ExtensionID}}` | +| `-first` | Returns the first n extensions from the list. (use -1 for unlimited) | `1000` | +| `-get-curl` | Print the curl command for executing this query and exit (WARNING: includes printing your access token!) | `false` | +| `-insecure-skip-verify` | Skip validation of TLS certificates against trusted chains | `false` | +| `-query` | Returns extensions whose extension IDs match the query. (e.g. "myextension") | | +| `-trace` | Log the trace ID for requests. See https://docs.sourcegraph.com/admin/observability/tracing | `false` | +| `-user-agent-telemetry` | Include the operating system and architecture in the User-Agent sent with requests to Sourcegraph | `true` | + + +## Usage + +``` +Usage of 'src extensions list': + -dump-requests + Log GraphQL requests and responses to stdout + -f string + Format for the output, using the syntax of Go package text/template. (e.g. "{{.ExtensionID}}: {{.Manifest.Description}} ({{.RemoteURL}})" or "{{.|json}}") (default "{{.ExtensionID}}") + -first int + Returns the first n extensions from the list. (use -1 for unlimited) (default 1000) + -get-curl + Print the curl command for executing this query and exit (WARNING: includes printing your access token!) + -insecure-skip-verify + Skip validation of TLS certificates against trusted chains + -query string + Returns extensions whose extension IDs match the query. (e.g. "myextension") + -trace + Log the trace ID for requests. See https://docs.sourcegraph.com/admin/observability/tracing + -user-agent-telemetry + Include the operating system and architecture in the User-Agent sent with requests to Sourcegraph (default true) + +Examples: + + List extensions: + + $ src extensions list + + List extensions whose names match the query: + + $ src extensions list -query='myquery' + + List *all* extensions (may be slow!): + + $ src extensions list -first='-1' + + + +``` + \ No newline at end of file diff --git a/doc/cli/references/extensions/publish.md b/doc/cli/references/extensions/publish.md new file mode 100644 index 00000000000..938695278f6 --- /dev/null +++ b/doc/cli/references/extensions/publish.md @@ -0,0 +1,69 @@ +# `src extensions publish` + + +## Flags + +| Name | Description | Default Value | +|------|-------------|---------------| +| `-dump-requests` | Log GraphQL requests and responses to stdout | `false` | +| `-extension-id` | Override the extension ID in the manifest. (default: read from -manifest file) | | +| `-force` | Force publish the extension, even if there are validation problems or other warnings. | `false` | +| `-get-curl` | Print the curl command for executing this query and exit (WARNING: includes printing your access token!) | `false` | +| `-git-head` | Override the current git commit for the bundle. (default: uses `git rev-parse head`) | | +| `-insecure-skip-verify` | Skip validation of TLS certificates against trusted chains | `false` | +| `-manifest` | The extension manifest file. | `package.json` | +| `-trace` | Log the trace ID for requests. See https://docs.sourcegraph.com/admin/observability/tracing | `false` | +| `-url` | Override the URL for the bundle. (example: set to http://localhost:1234/myext.js for local dev with parcel) | | +| `-user-agent-telemetry` | Include the operating system and architecture in the User-Agent sent with requests to Sourcegraph | `true` | + + +## Usage + +``` +Usage of 'src extensions publish': + -dump-requests + Log GraphQL requests and responses to stdout + -extension-id string + Override the extension ID in the manifest. (default: read from -manifest file) + -force + Force publish the extension, even if there are validation problems or other warnings. + -get-curl + Print the curl command for executing this query and exit (WARNING: includes printing your access token!) + -git-head git rev-parse head + Override the current git commit for the bundle. (default: uses git rev-parse head) + -insecure-skip-verify + Skip validation of TLS certificates against trusted chains + -manifest string + The extension manifest file. (default "package.json") + -trace + Log the trace ID for requests. See https://docs.sourcegraph.com/admin/observability/tracing + -url string + Override the URL for the bundle. (example: set to http://localhost:1234/myext.js for local dev with parcel) + -user-agent-telemetry + Include the operating system and architecture in the User-Agent sent with requests to Sourcegraph (default true) + +Publish an extension to Sourcegraph, creating it (if necessary). + +Examples: + + Publish the "alice/myextension" extension described by package.json in the current directory: + + $ cat package.json + { + "name": "myextension", + "publisher": "alice", + "title": "My Extension", + "main": "dist/myext.js", + "scripts": {"sourcegraph:prepublish": "parcel build --out-file dist/myext.js src/myext.ts"} + } + $ src extensions publish + +Notes: + + Source maps are supported (for easier debugging of extensions). If the main JavaScript bundle is "dist/myext.js", + it looks for a source map in "dist/myext.map". + + + +``` + \ No newline at end of file diff --git a/doc/cli/references/index.md b/doc/cli/references/index.md index 90224935994..8083df0bae1 100644 --- a/doc/cli/references/index.md +++ b/doc/cli/references/index.md @@ -18,6 +18,6 @@ * [`serve-git`](serve-git.md) * [`snapshot`](snapshot.md) * [`users`](users/index.md) -* [`validate`](validate/index.md) +* [`validate`](validate.md) * [`version`](version.md) \ No newline at end of file diff --git a/doc/cli/references/repos/add-kvp.md b/doc/cli/references/repos/add-kvp.md new file mode 100644 index 00000000000..3ca13816e87 --- /dev/null +++ b/doc/cli/references/repos/add-kvp.md @@ -0,0 +1,49 @@ +# `src repos add-kvp` + + +## Flags + +| Name | Description | Default Value | +|------|-------------|---------------| +| `-dump-requests` | Log GraphQL requests and responses to stdout | `false` | +| `-get-curl` | Print the curl command for executing this query and exit (WARNING: includes printing your access token!) | `false` | +| `-insecure-skip-verify` | Skip validation of TLS certificates against trusted chains | `false` | +| `-key` | The name of the key to add (required) | | +| `-repo` | The ID of the repo to add the key-value pair to (required) | | +| `-trace` | Log the trace ID for requests. See https://docs.sourcegraph.com/admin/observability/tracing | `false` | +| `-user-agent-telemetry` | Include the operating system and architecture in the User-Agent sent with requests to Sourcegraph | `true` | +| `-value` | The value associated with the key. Defaults to null. | | + + +## Usage + +``` +Usage of 'src repos add-kvp': + -dump-requests + Log GraphQL requests and responses to stdout + -get-curl + Print the curl command for executing this query and exit (WARNING: includes printing your access token!) + -insecure-skip-verify + Skip validation of TLS certificates against trusted chains + -key string + The name of the key to add (required) + -repo string + The ID of the repo to add the key-value pair to (required) + -trace + Log the trace ID for requests. See https://docs.sourcegraph.com/admin/observability/tracing + -user-agent-telemetry + Include the operating system and architecture in the User-Agent sent with requests to Sourcegraph (default true) + -value string + The value associated with the key. Defaults to null. + +Examples: + + Add a key-value pair to a repository: + + $ src repos add-kvp -repo=repoID -key=mykey -value=myvalue + + Omitting -value will create a tag (a key with a null value). + + +``` + \ No newline at end of file diff --git a/doc/cli/references/repos/delete-kvp.md b/doc/cli/references/repos/delete-kvp.md new file mode 100644 index 00000000000..f0a0ac89391 --- /dev/null +++ b/doc/cli/references/repos/delete-kvp.md @@ -0,0 +1,45 @@ +# `src repos delete-kvp` + + +## Flags + +| Name | Description | Default Value | +|------|-------------|---------------| +| `-dump-requests` | Log GraphQL requests and responses to stdout | `false` | +| `-get-curl` | Print the curl command for executing this query and exit (WARNING: includes printing your access token!) | `false` | +| `-insecure-skip-verify` | Skip validation of TLS certificates against trusted chains | `false` | +| `-key` | The name of the key to be deleted (required) | | +| `-repo` | The ID of the repo with the key-value pair to be deleted (required) | | +| `-trace` | Log the trace ID for requests. See https://docs.sourcegraph.com/admin/observability/tracing | `false` | +| `-user-agent-telemetry` | Include the operating system and architecture in the User-Agent sent with requests to Sourcegraph | `true` | + + +## Usage + +``` +Usage of 'src repos delete-kvp': + -dump-requests + Log GraphQL requests and responses to stdout + -get-curl + Print the curl command for executing this query and exit (WARNING: includes printing your access token!) + -insecure-skip-verify + Skip validation of TLS certificates against trusted chains + -key string + The name of the key to be deleted (required) + -repo string + The ID of the repo with the key-value pair to be deleted (required) + -trace + Log the trace ID for requests. See https://docs.sourcegraph.com/admin/observability/tracing + -user-agent-telemetry + Include the operating system and architecture in the User-Agent sent with requests to Sourcegraph (default true) + +Examples: + + Delete a key-value pair from a repository: + + $ src repos delete-kvp -repo=repoID -key=mykey + + + +``` + \ No newline at end of file diff --git a/doc/cli/references/repos/update-kvp.md b/doc/cli/references/repos/update-kvp.md new file mode 100644 index 00000000000..3201f8d2410 --- /dev/null +++ b/doc/cli/references/repos/update-kvp.md @@ -0,0 +1,49 @@ +# `src repos update-kvp` + + +## Flags + +| Name | Description | Default Value | +|------|-------------|---------------| +| `-dump-requests` | Log GraphQL requests and responses to stdout | `false` | +| `-get-curl` | Print the curl command for executing this query and exit (WARNING: includes printing your access token!) | `false` | +| `-insecure-skip-verify` | Skip validation of TLS certificates against trusted chains | `false` | +| `-key` | The name of the key to be updated (required) | | +| `-repo` | The ID of the repo with the key to be updated (required) | | +| `-trace` | Log the trace ID for requests. See https://docs.sourcegraph.com/admin/observability/tracing | `false` | +| `-user-agent-telemetry` | Include the operating system and architecture in the User-Agent sent with requests to Sourcegraph | `true` | +| `-value` | The new value of the key to be set. Defaults to null. | | + + +## Usage + +``` +Usage of 'src repos update-kvp': + -dump-requests + Log GraphQL requests and responses to stdout + -get-curl + Print the curl command for executing this query and exit (WARNING: includes printing your access token!) + -insecure-skip-verify + Skip validation of TLS certificates against trusted chains + -key string + The name of the key to be updated (required) + -repo string + The ID of the repo with the key to be updated (required) + -trace + Log the trace ID for requests. See https://docs.sourcegraph.com/admin/observability/tracing + -user-agent-telemetry + Include the operating system and architecture in the User-Agent sent with requests to Sourcegraph (default true) + -value string + The new value of the key to be set. Defaults to null. + +Examples: + + Update the value for a key on a repository: + + $ src repos update-kvp -repo=repoID -key=my-key -value=new-value + + Omitting -value will set the value of the key to null. + + +``` + \ No newline at end of file diff --git a/doc/cli/references/users/clean.md b/doc/cli/references/users/prune.md similarity index 77% rename from doc/cli/references/users/clean.md rename to doc/cli/references/users/prune.md index 41718213d39..471fb7b90a5 100644 --- a/doc/cli/references/users/clean.md +++ b/doc/cli/references/users/prune.md @@ -1,4 +1,4 @@ -# `src users clean` +# `src users prune` ## Flags @@ -6,12 +6,13 @@ | Name | Description | Default Value | |------|-------------|---------------| | `-days` | Days threshold on which to remove users, must be 60 days or greater and defaults to this value | `60` | +| `-display-users` | display table of users to be deleted by prune | `false` | | `-dump-requests` | Log GraphQL requests and responses to stdout | `false` | | `-force` | skips user confirmation step allowing programmatic use | `false` | | `-get-curl` | Print the curl command for executing this query and exit (WARNING: includes printing your access token!) | `false` | | `-insecure-skip-verify` | Skip validation of TLS certificates against trusted chains | `false` | -| `-remove-admin` | clean admin accounts | `false` | -| `-remove-never-active` | removes users with null lastActive value | `false` | +| `-remove-admin` | prune admin accounts | `false` | +| `-remove-null-users` | removes users with no last active value | `false` | | `-trace` | Log the trace ID for requests. See https://docs.sourcegraph.com/admin/observability/tracing | `false` | | `-user-agent-telemetry` | Include the operating system and architecture in the User-Agent sent with requests to Sourcegraph | `true` | @@ -19,9 +20,11 @@ ## Usage ``` -Usage of 'src users clean': +Usage of 'src users prune': -days int Days threshold on which to remove users, must be 60 days or greater and defaults to this value (default 60) + -display-users + display table of users to be deleted by prune -dump-requests Log GraphQL requests and responses to stdout -force @@ -31,9 +34,9 @@ Usage of 'src users clean': -insecure-skip-verify Skip validation of TLS certificates against trusted chains -remove-admin - clean admin accounts - -remove-never-active - removes users with null lastActive value + prune admin accounts + -remove-null-users + removes users with no last active value -trace Log the trace ID for requests. See https://docs.sourcegraph.com/admin/observability/tracing -user-agent-telemetry @@ -43,9 +46,9 @@ This command removes users from a Sourcegraph instance who have been inactive fo Examples: - $ src users clean -days 182 + $ src users prune -days 182 - $ src users clean -remove-admin -remove-never-active + $ src users prune -remove-admin -remove-null-users ``` diff --git a/doc/cli/references/validate.md b/doc/cli/references/validate.md new file mode 100644 index 00000000000..47cc1d4f39e --- /dev/null +++ b/doc/cli/references/validate.md @@ -0,0 +1,27 @@ +# `src validate` + + + +## Usage + +``` +'src validate' is a tool that validates a Sourcegraph instance. + +EXPERIMENTAL: 'validate' is an experimental command in the 'src' tool. + +Please visit https://docs.sourcegraph.com/admin/validation for documentation of the validate command. + +Usage: + + src validate command [command options] + +The commands are: + + install validates a Sourcegraph installation + kube validates a Sourcegraph deployment on a Kubernetes cluster + +Use "src validate [command] -h" for more information about a command. + + +``` + \ No newline at end of file diff --git a/doc/cli/references/validate/index.md b/doc/cli/references/validate/index.md deleted file mode 100644 index 0fb78b8114b..00000000000 --- a/doc/cli/references/validate/index.md +++ /dev/null @@ -1,7 +0,0 @@ -# `src validate` - -## Subcommands - - -* [`install`](install.md) -* [`kube`](kube.md) \ No newline at end of file diff --git a/doc/cli/references/validate/kube.md b/doc/cli/references/validate/kube.md deleted file mode 100644 index 4c6a83f1261..00000000000 --- a/doc/cli/references/validate/kube.md +++ /dev/null @@ -1,38 +0,0 @@ -# `src validate kube` - - -## Flags - -| Name | Description | Default Value | -|------|-------------|---------------| -| `-kubeconfig` | Absolute path to the kubeconfig file | `~/.kube/config` | -| `-namespace` | Specify the Kubernetes namespace to use | `default` | -| `-quiet` | Suppress output and return exit status only | `false` | - - -## Usage - -``` -Usage of 'src validate kube': - -kubeconfig string - (optional) absolute path to the kubeconfig file (default "~/.kube/config") - -namespace string - (optional) specify the kubernetes namespace to use - -quiet - (optional) suppress output and return exit status only -'src validate kube' is a tool that validates a Kubernetes based Sourcegraph deployment - -Examples: - - Run default deployment validation: - $ src validate kube - - Specify Kubernetes namespace: - $ src validate kube --namespace sourcegraph - - Specify the kubeconfig file location: - $ src validate kube --kubeconfig ~/.kube/config - - Suppress output (useful for CI/CD pipelines) - $ src validate kube --quiet -``` \ No newline at end of file diff --git a/internal/src-cli/consts.go b/internal/src-cli/consts.go index f59d6cfb245..114faf1f29e 100644 --- a/internal/src-cli/consts.go +++ b/internal/src-cli/consts.go @@ -6,4 +6,4 @@ package srccli // as the suggested download with this instance. // // At the time of a Sourcegraph release, this is always the latest src-cli version. -const MinimumVersion = "4.4.0" +const MinimumVersion = "4.5.0"