Skip to content

Instantly share code, notes, and snippets.

@brettmillerb
Created July 7, 2022 08:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brettmillerb/7a364d764e1f6c0e8917ece1c03d89bb to your computer and use it in GitHub Desktop.
Save brettmillerb/7a364d764e1f6c0e8917ece1c03d89bb to your computer and use it in GitHub Desktop.
Stackoverflow Pipelines Example
- task: AzureCLI@2
displayName: Check Azure Functions Deployed
env:
RESOURCE_GROUP: $(ResourceGroup)
FUNCTION_NAME: $(FunctionName)
inputs:
azureSubscription: Microsoft Azure Subscription
scriptType: bash
scriptLocation: inlineScript
inlineScript: |
CURRENT_SUBSCRIPTION=$(az account show --query id -o tsv)
URI = 'https://management.azure.com/subscriptions/$CURRENT_SUBSCRIPTION/resourceGroups/$RESOURCE_GROUP/providers/Microsoft.Web/sites/$FUNCTION_NAME/functions?api-version=2015-08-01'
az rest -u $URI --method get | jq '.value[].name'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment