Skip to content

Instantly share code, notes, and snippets.

@RaphHaddad
Last active July 27, 2022 23:13
Show Gist options
  • Save RaphHaddad/6fee2ef3b09910bad967ac187ec661f5 to your computer and use it in GitHub Desktop.
Save RaphHaddad/6fee2ef3b09910bad967ac187ec661f5 to your computer and use it in GitHub Desktop.
Azure DevOps cli

Azure DevOps CLI Tricks

Run all pipelines with JMESQuery

az pipelines list --query "[?path=='\\back-end'] | [].id" --output tsv | xargs -L1 az pipelines run --branch main --id

Find all pipelines under folder with Id and Name

az pipelines list --query "[?path=='\\back-end'] | [].{ID:id, NAME:name}" --output tsv

Find YAML file for pipelines

az pipelines list --query "[?path=='\\back-end'] | [].id" --output tsv | xargs -L1 az pipelines show --query "{NAME:name, YamlFile:process.yamlFilename}" --output tsv  --id
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment