azure-devops-cli-extension icon indicating copy to clipboard operation
azure-devops-cli-extension copied to clipboard

[Feature Request] All az pipelines variable-group subcommands should support --name argument

Open jikuja opened this issue 2 years ago • 0 comments

Is your feature request related to a problem? Please describe. All az pipelines variable-group subcommands should support --name argument.

If user wants to update, show, delete variable groups or add, edit or delete group variabled group-id must be known. To fetch group ip user must do extra manual request with CLI.

Describe the solution you'd like Extension should support --name and fetch group id internally

Workaround for batch update

id=$($CMD pipelines variable-group list $AZ_EXTRA_FLAGS --org "$ORG" --project "$PROJECT" --output tsv --query '[?name == `'common'`]'.id)
$CMD pipelines variable-group delete $AZ_EXTRA_FLAGS --org "$ORG" --project "$PROJECT" --group-id $id
$CMD pipelines variable-group create $AZ_EXTRA_FLAGS --org "$ORG" --project "$PROJECT" --name common --variables $COMMON_VARIABLE_GROUP --authorize true

jikuja avatar Dec 30 '22 11:12 jikuja