azure-devops-cli-extension
azure-devops-cli-extension copied to clipboard
[Feature Request] All az pipelines variable-group subcommands should support --name argument
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