Skip to content

feat: Introduce azdo pipelines variable-group subgroup #117

Description

@tmeckel

This issue tracks establishing the azdo pipelines variable-group subgroup under the top-level pipelines hierarchy.

Command Group Description

Variable groups are reusable name/value collections that can be shared across multiple pipelines. The Azure CLI exposes them under az pipelines variable-group with CRUD operations and nested commands for managing individual variables. In azdo, this subgroup should own all variable-group scoped commands and provide consistent argument parsing, progress indicators, JSON output, and table formatting per repository conventions.

Command Surface

Follow-up issues cover each leaf command; this parent wires the subgroup and shared helpers:

Scope & Argument Pattern

  • All child commands share the [ORGANIZATION/]PROJECT positional argument pattern from ISSUE-TRIAGE.md. When the organization segment is omitted, fall back to the configured default; otherwise validate the provided organization URL.
  • Provide persistent JSON flags via util.AddJSONFlags(cmd, &opts.exporter, ...) so leaf commands can reuse the configured exporter.
  • Enforce kebab-case flags within the subgroup (e.g., --group-id, --authorize, --variable).

Implementation Outline

  • Create internal/cmd/pipelines/variablegroup/variablegroup.go defining NewCmd(ctx util.CmdContext) *cobra.Command with Use: "variable-group", descriptions, and child registration hooks (cmd.AddCommand(create.NewCmd(ctx)), etc.).
  • Ensure the command only resolves IO streams when necessary and keeps shared helpers (scope parsing, variable-group resolution, authorization toggles) in dedicated internal packages for reuse.
  • Wire the subgroup inside internal/cmd/pipelines/pipelines.go via pipelinesCmd.AddCommand(variablegroup.NewCmd(ctx)).
  • Provide help examples covering project-scoped usage and JSON export.
  • Run make docs after the subgroup and leaf commands land so generated markdown reflects the hierarchy.

Testing

  • The grouping command does not need direct unit tests, but ensure acceptance/smoke tests that rely on command discovery are updated after wiring.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions