This issue tracks the implementation of the azdo pipelines variable-group variable list command.
Command Description
List the variables in a variable group. The Azure CLI retrieves the group and returns the variables dictionary as-is (source). azdo should expose the same information with user-friendly formatting, readOnly metadata, and JSON export.
azdo Command Signature
azdo pipelines variable-group variable list [ORGANIZATION/]PROJECT/VARIABLE_GROUP_ID_OR_NAME
Behavior
- Resolve project scope and group identifier via the shared helper.
- Start the progress indicator, fetch the group, then stop the indicator prior to rendering output.
- If the group is missing, return a descriptive error.
- Sort variables alphabetically for deterministic output.
- Default table columns:
NAME, VALUE (mask when secret), SECRET (Yes/No), READ-ONLY (Yes/No).
- Register JSON fields with
util.AddJSONFlags(cmd, &opts.exporter, []string{"name","secret","readOnly","value"}) and emit a slice of { name, secret, readOnly, value *string }. Drop the value pointer when secret is true so filtering via --json name,secret works predictably.
- Add
zap.L().Debug logs for group resolution.
Command Wiring
- Implement
internal/cmd/pipelines/variablegroup/variable/list/list.go with NewCmd(ctx util.CmdContext) *cobra.Command.
- Register it from
internal/cmd/pipelines/variablegroup/variable/variable.go so the hierarchy exposes azdo pipelines variable-group variable list.
- Run
make docs after wiring.
SDK / Client Requirements
- Requires the Task Agent client (
ClientFactory().TaskAgent(...)). If missing, follow Handling Missing Azure DevOps SDK Clients.
Tooling & Validation
gofmt/goimports new files.
go build ./cmd/azdo/... to ensure compilation.
- Add/update hermetic tests with mocks; run
go test ./....
Testing
- Successful listing with secret + non-secret variables.
- Missing group error.
- Deterministic ordering.
- JSON export structure.
References
This issue tracks the implementation of the
azdo pipelines variable-group variable listcommand.Command Description
List the variables in a variable group. The Azure CLI retrieves the group and returns the
variablesdictionary as-is (source).azdoshould expose the same information with user-friendly formatting,readOnlymetadata, and JSON export.azdoCommand Signatureazdo pipelines variable-group variable list [ORGANIZATION/]PROJECT/VARIABLE_GROUP_ID_OR_NAMEBehavior
NAME,VALUE(mask when secret),SECRET(Yes/No),READ-ONLY(Yes/No).util.AddJSONFlags(cmd, &opts.exporter, []string{"name","secret","readOnly","value"})and emit a slice of{ name, secret, readOnly, value *string }. Drop thevaluepointer whensecretis true so filtering via--json name,secretworks predictably.zap.L().Debuglogs for group resolution.Command Wiring
internal/cmd/pipelines/variablegroup/variable/list/list.gowithNewCmd(ctx util.CmdContext) *cobra.Command.internal/cmd/pipelines/variablegroup/variable/variable.goso the hierarchy exposesazdo pipelines variable-group variable list.make docsafter wiring.SDK / Client Requirements
ClientFactory().TaskAgent(...)). If missing, follow Handling Missing Azure DevOps SDK Clients.Tooling & Validation
gofmt/goimportsnew files.go build ./cmd/azdo/...to ensure compilation.go test ./....Testing
References
variable_group_variable_list