Skip to content

feat: azdo pipelines variable command group #118

@tmeckel

Description

@tmeckel

This issue tracks creating the azdo pipelines variable subgroup for managing definition-scoped pipeline variables.

Command Group Description

The Azure CLI provides az pipelines variable commands for CRUD operations on variables stored in a specific classic pipeline definition (build definition). azdo should expose an ergonomic subgroup that handles subject resolution (pipeline ID vs name), secret prompting, and JSON/list output consistent with the rest of the CLI.

Command Surface

Child issues will implement the following leaf commands:

  • azdo pipelines variable create
  • azdo pipelines variable update
  • azdo pipelines variable list
  • azdo pipelines variable delete

Scope & Argument Pattern

  • Require a positional [ORGANIZATION/]PROJECT argument across the subgroup to select the project. When the organization segment is omitted, fall back to the configured default organization; error if neither is available.
  • Each leaf command must accept either --pipeline-id (integer) or --pipeline (case-insensitive definition name) to target the pipeline definition, mirroring the Azure CLI behavior while avoiding positional ambiguity.
  • Secret handling flags (--secret, --prompt-value) should mirror the Azure CLI semantics but follow azdo naming conventions.

Implementation Outline

  • Add internal/cmd/pipelines/variable/variable.go exposing NewCmd(ctx util.CmdContext) *cobra.Command and registering leaf commands from sibling packages.
  • Wire the subgroup inside internal/cmd/pipelines/pipelines.go via pipelinesCmd.AddCommand(variable.NewCmd(ctx)).
  • Provide help text summarizing the available operations and clarifying pipeline targeting options.
  • Ensure JSON export flags are available when a command needs to emit structured output.

Testing

  • The grouping command itself does not need dedicated tests; child issues will add unit/acceptance coverage for functional paths.

References

Sub-issues

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