feat: archive template versions to hide them from the ui (#10179)

* api + cli implementation
This commit is contained in:
Steven Masley
2023-10-11 09:26:22 -05:00
committed by GitHub
parent edbd51955c
commit 1e950fa9a8
35 changed files with 1472 additions and 38 deletions
+1
View File
@@ -35,6 +35,7 @@ Templates are written in standard Terraform and describe the infrastructure for
| Name | Purpose |
| ------------------------------------------------ | ------------------------------------------------------------------------------ |
| [<code>archive</code>](./templates_archive.md) | Archive unused or failed template versions from a given template(s) |
| [<code>create</code>](./templates_create.md) | Create a template from the current directory or as specified by flag |
| [<code>delete</code>](./templates_delete.md) | Delete templates |
| [<code>edit</code>](./templates_edit.md) | Edit the metadata of a template by name. |
+29
View File
@@ -0,0 +1,29 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# templates archive
Archive unused or failed template versions from a given template(s)
## Usage
```console
coder templates archive [flags] [template-name...]
```
## Options
### --all
| | |
| ---- | ----------------- |
| Type | <code>bool</code> |
Include all unused template versions. By default, only failed template versions are archived.
### -y, --yes
| | |
| ---- | ----------------- |
| Type | <code>bool</code> |
Bypass prompts.
+5 -3
View File
@@ -24,6 +24,8 @@ coder templates versions
## Subcommands
| Name | Purpose |
| ------------------------------------------------- | ----------------------------------------------- |
| [<code>list</code>](./templates_versions_list.md) | List all the versions of the specified template |
| Name | Purpose |
| ----------------------------------------------------------- | ----------------------------------------------- |
| [<code>archive</code>](./templates_versions_archive.md) | Archive a template version(s). |
| [<code>list</code>](./templates_versions_list.md) | List all the versions of the specified template |
| [<code>unarchive</code>](./templates_versions_unarchive.md) | Unarchive a template version(s). |
+21
View File
@@ -0,0 +1,21 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# templates versions archive
Archive a template version(s).
## Usage
```console
coder templates versions archive [flags] <template-name> [template-version-names...]
```
## Options
### -y, --yes
| | |
| ---- | ----------------- |
| Type | <code>bool</code> |
Bypass prompts.
+10 -2
View File
@@ -17,9 +17,17 @@ coder templates versions list [flags] <template>
| | |
| ------- | ----------------------------------------------------- |
| Type | <code>string-array</code> |
| Default | <code>name,created at,created by,status,active</code> |
| Default | <code>Name,Created At,Created By,Status,Active</code> |
Columns to display in table output. Available columns: name, created at, created by, status, active.
Columns to display in table output. Available columns: name, created at, created by, status, active, archived.
### --include-archived
| | |
| ---- | ----------------- |
| Type | <code>bool</code> |
Include archived versions in the result list.
### -o, --output
+21
View File
@@ -0,0 +1,21 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# templates versions unarchive
Unarchive a template version(s).
## Usage
```console
coder templates versions unarchive [flags] <template-name> [template-version-names...]
```
## Options
### -y, --yes
| | |
| ---- | ----------------- |
| Type | <code>bool</code> |
Bypass prompts.