You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Introduce a new build subgroup under the existing azdo pipelines command group (umbrella tracked in #116). The build subgroup is a thin router: it has no leaf commands of its own at the moment — it registers the list leaf (tracked in #211) and serves as the natural home for future legacy-Build-API commands (e.g. show, queue, cancel) and nested definition and tag subgroups.
The build subgroup surfaces the legacy Azure DevOps Build API surface (the az pipelines build group from the Azure CLI). It is distinct from the runs subgroup (#214), which surfaces the modern Azure Pipelines API surface (the az pipelines runs group). Both subgroups share the same vendored SDK client (build.Client) — the split is purely CLI ergonomics to match the Azure CLI's terminology and Python extension's command group registration.
Implementation Notes
The build subgroup has no behavior of its own. Its sole responsibility is to register child leaf commands via cmd.AddCommand(...).
No new SDK client is required — build.Client is already wired in internal/azdo/connection.go:50-51 (interface) and internal/azdo/factory.go:61 (impl). No new mocks are required — MockBuildClient.GetBuilds and MockBuildClient.QueueBuild (and any other future Build methods) are already present.
No new shared helpers are required for this parent. Future shared logic across multiple build leaves (e.g. a common runTableRow helper) may be extracted into this package's build.go or a separate internal/cmd/pipelines/build/shared package — do not pre-extract.
The Use: line should be build (no description on the Use line itself; the Short and Long fields provide description text).
Aliases are not provided on group commands; only on leaf commands.
Command Wiring
Create internal/cmd/pipelines/build/build.go:
package build
import (
"github.com/spf13/cobra""github.com/tmeckel/azdo-cli/internal/cmd/pipelines/build/cancel""github.com/tmeckel/azdo-cli/internal/cmd/pipelines/build/list""github.com/tmeckel/azdo-cli/internal/cmd/pipelines/build/queue""github.com/tmeckel/azdo-cli/internal/cmd/pipelines/build/show""github.com/tmeckel/azdo-cli/internal/cmd/pipelines/build/tag"// new in #276"github.com/tmeckel/azdo-cli/internal/cmd/util"
)
funcNewCmd(ctx util.CmdContext) *cobra.Command {
cmd:=&cobra.Command{
Use: "build",
Short: "Manage legacy Azure DevOps Build API resources.",
Long: `Surface for the legacy Azure DevOps Build API.Mirrors the 'az pipelines build' group from the Azure CLI. Routes to childcommands that operate on the Build REST API (builds, definitions, queues).`,
}
cmd.AddCommand(list.NewCmd(ctx))
cmd.AddCommand(show.NewCmd(ctx))
cmd.AddCommand(cancel.NewCmd(ctx)) // new in #252cmd.AddCommand(queue.NewCmd(ctx)) // new in #253cmd.AddCommand(tag.NewCmd(ctx)) // new in #276returncmd
}
Register the new subgroup in the existing umbrella at internal/cmd/pipelines/pipelines.go:
import (
// ... existing imports ..."github.com/tmeckel/azdo-cli/internal/cmd/pipelines/build""github.com/tmeckel/azdo-cli/internal/cmd/pipelines/runs"// ...
)
funcNewCmd(ctx util.CmdContext) *cobra.Command {
cmd:=&cobra.Command{ /* ... existing ... */ }
cmd.AddCommand(variablegroup.NewCmd(ctx))
cmd.AddCommand(variable.NewCmd(ctx))
cmd.AddCommand(build.NewCmd(ctx)) // new in #213cmd.AddCommand(runs.NewCmd(ctx)) // new in #214returncmd
}
No change is required to internal/cmd/root/root.go (the pipelines group is already registered).
Factory: internal/azdo/factory.go:61 — constructs the client from the connection.
Mock: internal/mocks/build_client_mock.go — full mock implementing build.Client; GetBuilds is at lines 701-714, UpdateBuild at line 1286, QueueBuild at line 1227, GetDefinitions at line 837, AddBuildTag at line 46, AddBuildTags at line 61, DeleteBuildTag at line 210, GetBuildTags at line ~700.
No new vendored packages required. vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v7/build/ is already present.
Each new leaf will be filed as a follow-up issue using the same canonical 12-section body format. When filed, the issue number will replace the placeholder in the checklist above.
Tooling & Validation
go build ./... is clean.
go test ./internal/cmd/pipelines/build/... passes.
go run cmd/azdo/azdo.go pipelines build --help renders the subgroup's short and long descriptions and lists list, show, cancel, queue, and tag as children.
go run cmd/azdo/azdo.go pipelines --help shows build alongside variable-group and variable.
make lint passes (golangci-lint, per .golangci.yml).
make docs regenerates docs/pipelines_build.md with the new subgroup.
Introduce a new
buildsubgroup under the existingazdo pipelinescommand group (umbrella tracked in #116). Thebuildsubgroup is a thin router: it has no leaf commands of its own at the moment — it registers thelistleaf (tracked in #211) and serves as the natural home for future legacy-Build-API commands (e.g.show,queue,cancel) and nesteddefinitionandtagsubgroups.The
buildsubgroup surfaces the legacy Azure DevOps Build API surface (theaz pipelines buildgroup from the Azure CLI). It is distinct from therunssubgroup (#214), which surfaces the modern Azure Pipelines API surface (theaz pipelines runsgroup). Both subgroups share the same vendored SDK client (build.Client) — the split is purely CLI ergonomics to match the Azure CLI's terminology and Python extension's command group registration.Implementation Notes
buildsubgroup has no behavior of its own. Its sole responsibility is to register child leaf commands viacmd.AddCommand(...).azdo pipelines build list(tracked in feat: Implementazdo pipelines build listcommand #211). Future children follow the same leaf issue template.build.Clientis already wired ininternal/azdo/connection.go:50-51(interface) andinternal/azdo/factory.go:61(impl). No new mocks are required —MockBuildClient.GetBuildsandMockBuildClient.QueueBuild(and any other futureBuildmethods) are already present.buildleaves (e.g. a commonrunTableRowhelper) may be extracted into this package'sbuild.goor a separateinternal/cmd/pipelines/build/sharedpackage — do not pre-extract.Use:line should bebuild(no description on theUseline itself; theShortandLongfields provide description text).Command Wiring
internal/cmd/pipelines/build/build.go:internal/cmd/pipelines/pipelines.go:internal/cmd/root/root.go(thepipelinesgroup is already registered).SDK / Client Requirements
build.Client(vendored, already wired).internal/azdo/connection.go:50-51—Build(ctx context.Context, organization string) (build.Client, error).internal/azdo/factory.go:61— constructs the client from the connection.internal/mocks/build_client_mock.go— full mock implementingbuild.Client;GetBuildsis at lines 701-714,UpdateBuildat line 1286,QueueBuildat line 1227,GetDefinitionsat line 837,AddBuildTagat line 46,AddBuildTagsat line 61,DeleteBuildTagat line 210,GetBuildTagsat line ~700.vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v7/build/is already present.azdo pipelines build cancelcommand #252, feat: Implementazdo pipelines build queuecommand #253, Introduceazdo pipelines build tagcommand group #276). All methods needed are already mocked.go mod tidy/go mod vendor/scripts/generate_mocks.shwork required for this parent or for any of its sub-issues.Subgroup Wiring
buildsubgroup also exposes nested subgroups: atagsubgroup (introduced by Introduceazdo pipelines build tagcommand group #276) and a planneddefinitionsubgroup (not yet filed).internal/cmd/pipelines/build/build.goto callcmd.AddCommand(tag.NewCmd(ctx))once thetagsubgroup is implemented.Sub-Issues
azdo pipelines build listcommand #211 —feat: Implement \azdo pipelines build list` command` (filed).azdo pipelines build showcommand #241 —feat: Implement \azdo pipelines build show` command` (filed).azdo pipelines build cancelcommand #252 —feat: Implement \azdo pipelines build cancel` command` (filed).azdo pipelines build queuecommand #253 —feat: Implement \azdo pipelines build queue` command` (filed).azdo pipelines build tagcommand group #276 — Introduce `azdo pipelines build tag` subgroup (filed).feat: Introduce \azdo pipelines build definition` subgroup` (planned; not yet filed).Each new leaf will be filed as a follow-up issue using the same canonical 12-section body format. When filed, the issue number will replace the placeholder in the checklist above.
Tooling & Validation
go build ./...is clean.go test ./internal/cmd/pipelines/build/...passes.go run cmd/azdo/azdo.go pipelines build --helprenders the subgroup's short and long descriptions and listslist,show,cancel,queue, andtagas children.go run cmd/azdo/azdo.go pipelines --helpshowsbuildalongsidevariable-groupandvariable.make lintpasses (golangci-lint, per.golangci.yml).make docsregeneratesdocs/pipelines_build.mdwith the new subgroup.References
azdo pipelinescommand group #116 (feat: \azdo pipelines` command group`).azdo pipelines runscommand group #214 (feat: Introduce \azdo pipelines runs` command group`).azdo boards area projectcommand group #141 (azdo boards area project), feat: Introduceazdo boards iteration projectcommand group #142 (azdo boards iteration project) — same template as this issue, no reference to closed siblings because thebuildsubgroup is brand-new.vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v7/build/client.go.internal/azdo/connection.go:50-51,internal/azdo/factory.go:61.internal/mocks/build_client_mock.go.azure-dev-ops-cli-extension/azure-dev-ops/azuredevops/azext_devops/dev/pipelines/commands.py#L84-L92—pipelines buildgroup registration.azure-dev-ops-cli-extension/azure-dev-ops/azuredevops/azext_devops/dev/pipelines/build.py—build_list,build_queue(L26-75),build_cancel(L106-120),add_build_tags(L184),delete_build_tag(L198),get_build_tags(L210).