Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions docs/azdo_help_reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,17 +200,17 @@ Aliases
p
```

### `azdo pipelines variable-groups`
### `azdo pipelines variable-group`

Manage Azure DevOps variable groups

Aliases

```
variable-groups, variablegroups, vg
variablegroup, variable-groups, variablegroups, vg
```

#### `azdo pipelines variable-groups list [ORGANIZATION/]PROJECT [flags]`
#### `azdo pipelines variable-group list [ORGANIZATION/]PROJECT [flags]`

List variable groups

Expand All @@ -230,7 +230,7 @@ Aliases
ls, l
```

#### `azdo pipelines variable-groups variable`
#### `azdo pipelines variable-group variable`

Manage variables in a variable group

Expand All @@ -240,7 +240,7 @@ Aliases
var
```

##### `azdo pipelines variable-groups variable list [ORGANIZATION/]PROJECT/VARIABLEGROUP [flags]`
##### `azdo pipelines variable-group variable list [ORGANIZATION/]PROJECT/VARIABLEGROUP [flags]`

List variables in a variable group

Expand Down
2 changes: 1 addition & 1 deletion docs/azdo_pipelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Manage Azure DevOps pipelines

### Available commands

* [azdo pipelines variable-groups](./azdo_pipelines_variable-groups.md)
* [azdo pipelines variable-group](./azdo_pipelines_variable-group.md)

### ALIASES

Expand Down
19 changes: 19 additions & 0 deletions docs/azdo_pipelines_variable-group.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
## Command `azdo pipelines variable-group`

Manage Azure DevOps variable groups

### Available commands

* [azdo pipelines variable-group list](./azdo_pipelines_variable-group_list.md)
* [azdo pipelines variable-group variable](./azdo_pipelines_variable-group_variable.md)

### ALIASES

- `variablegroup`
- `variable-groups`
- `variablegroups`
- `vg`

### See also

* [azdo pipelines](./azdo_pipelines.md)
63 changes: 63 additions & 0 deletions docs/azdo_pipelines_variable-group_list.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
## Command `azdo pipelines variable-group list`

```
azdo pipelines variable-group list [ORGANIZATION/]PROJECT [flags]
```

List every variable group defined in a project with optional filtering.


### Options


* `--action` `string`

Action filter string (e.g., 'manage', 'use'): {none|manage|use}

* `-q`, `--jq` `expression`

Filter JSON output using a jq expression

* `--json` `fields`

Output JSON with the specified fields. Prefix a field with '-' to exclude it.

* `--max-items` `int` (default `0`)

Optional client-side cap on results; stop fetching once reached

* `--order` `string` (default `"desc"`)

Order of variable groups (asc, desc): {desc|asc}

* `-t`, `--template` `string`

Format JSON output using a Go template; see "azdo help formatting"

* `--top` `int` (default `0`)

Server-side page size hint (positive integer)


### ALIASES

- `ls`
- `l`

### JSON Fields

`createdBy`, `createdOn`, `description`, `id`, `isShared`, `modifiedBy`, `modifiedOn`, `name`, `projectReferences`, `type`, `variables`

### Examples

```bash
# List all variable groups in a project
$ azdo pipelines variable-groups list "my-project"

# List variable groups with a specific name
$ azdo pipelines variable-groups list "my-project" --name "my-variable-group"
```

### See also

* [azdo pipelines variable-group](./azdo_pipelines_variable-group.md)
16 changes: 16 additions & 0 deletions docs/azdo_pipelines_variable-group_variable.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
## Command `azdo pipelines variable-group variable`

Work with variables within Azure Pipelines variable groups.


### Available commands

* [azdo pipelines variable-group variable list](./azdo_pipelines_variable-group_variable_list.md)

### ALIASES

- `var`

### See also

* [azdo pipelines variable-group](./azdo_pipelines_variable-group.md)
50 changes: 50 additions & 0 deletions docs/azdo_pipelines_variable-group_variable_list.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
## Command `azdo pipelines variable-group variable list`

```
azdo pipelines variable-group variable list [ORGANIZATION/]PROJECT/VARIABLEGROUP [flags]
```

List the variables in a variable group.

The command retrieves a variable group and lists its variables. Secret variables have their
values masked by default.

The VARIABLEGROUP can be specified by its ID or name.


### Options


* `-q`, `--jq` `expression`

Filter JSON output using a jq expression

* `--json` `fields`

Output JSON with the specified fields. Prefix a field with '-' to exclude it.

* `-t`, `--template` `string`

Format JSON output using a Go template; see "azdo help formatting"


### JSON Fields

`name`, `secret`, `value`

### Examples

```bash
# List variables in a group by ID within a project
azdo pipelines variable-groups variable list MyProject/123

# List variables in a group by name within a project and organization
azdo pipelines variable-groups variable list 'MyOrg/MyProject/My Variable Group'

# Export variables to JSON
azdo pipelines variable-groups variable list MyProject/123 --json
```

### See also

* [azdo pipelines variable-group variable](./azdo_pipelines_variable-group_variable.md)
4 changes: 2 additions & 2 deletions internal/cmd/pipelines/pipelines.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package pipelines

import (
"github.com/spf13/cobra"
"github.com/tmeckel/azdo-cli/internal/cmd/pipelines/variablegroups"
"github.com/tmeckel/azdo-cli/internal/cmd/pipelines/variablegroup"
"github.com/tmeckel/azdo-cli/internal/cmd/util"
)

Expand All @@ -13,6 +13,6 @@ func NewCmd(ctx util.CmdContext) *cobra.Command {
Aliases: []string{"p"},
}

cmd.AddCommand(variablegroups.NewCmd(ctx))
cmd.AddCommand(variablegroup.NewCmd(ctx))
return cmd
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package variable
import (
"github.com/MakeNowJust/heredoc"
"github.com/spf13/cobra"
"github.com/tmeckel/azdo-cli/internal/cmd/pipelines/variablegroups/variable/list"
"github.com/tmeckel/azdo-cli/internal/cmd/pipelines/variablegroup/variable/list"
"github.com/tmeckel/azdo-cli/internal/cmd/util"
)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
package variablegroups
package variablegroup

import (
"github.com/spf13/cobra"
"github.com/tmeckel/azdo-cli/internal/cmd/pipelines/variablegroups/list"
"github.com/tmeckel/azdo-cli/internal/cmd/pipelines/variablegroups/variable"
"github.com/tmeckel/azdo-cli/internal/cmd/pipelines/variablegroup/list"
"github.com/tmeckel/azdo-cli/internal/cmd/pipelines/variablegroup/variable"
"github.com/tmeckel/azdo-cli/internal/cmd/util"
)

func NewCmd(ctx util.CmdContext) *cobra.Command {
cmd := &cobra.Command{
Use: "variable-groups",
Use: "variable-group",
Short: "Manage Azure DevOps variable groups",
Aliases: []string{
"variablegroup",
"variable-groups",
"variablegroups",
"vg",
Expand Down
Loading