From 1a28b67436e4838cdf17c3b8deef8d56a0a1111e Mon Sep 17 00:00:00 2001 From: Matthew Christopher Date: Fri, 29 Jul 2022 10:50:09 -0700 Subject: [PATCH] Fix ADO job cluster query (#2421) ARM apperantly now can return Type either in the correct case or lowercase. This feels like a bug but it's not something they're fixing anytime soon, so for now we need to work around it. --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 434823f29a2..8f00ce5aafa 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -292,7 +292,7 @@ jobs: scriptType: 'bash' scriptLocation: 'inlineScript' inlineScript: | - az resource list --tag freeforpipeline=true --query "[?type=='Microsoft.ContainerService/managedClusters'].{Name:name}" -o table > clusters.txt + az resource list --tag freeforpipeline=true --query "[?(type == 'Microsoft.ContainerService/managedClusters') || (type == 'microsoft.containerservice/managedclusters')].{Name:name}" -o table > clusters.txt clustername=$(tail -n 1 clusters.txt) if [ "$clustername" == "" ]; then echo AKS clusters unavailable