Skip to content

Instantly share code, notes, and snippets.

@Fazzani
Last active November 7, 2020 19:24
Show Gist options
  • Save Fazzani/4e6f1140e7c2b9f7d2ce95e5412bf384 to your computer and use it in GitHub Desktop.
Save Fazzani/4e6f1140e7c2b9f7d2ce95e5412bf384 to your computer and use it in GitHub Desktop.
Getting and updating azure devops variables-group
echo $MY_AZURE_DEVOPS_PAT | az devops login
az pipelines variable-group list --org $MY_AZURE_DEVOPS_ORG -p SynkerAPI
// Insert new var in a variables-group 3
az pipelines variable-group variable create --id 3 --name "test" --value "testValue" --org $MY_AZURE_DEVOPS_ORG -p SynkerAPI
az pipelines variable-group variable delete --id 3 --name "test" --org $MY_AZURE_DEVOPS_ORG -p SynkerAPI
// Get var-group id by name
az pipelines variable-group list --org $MY_AZURE_DEVOPS_ORG -p SynkerAPI --query "[?name=='Common'].id" -o tsv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment