From 72ed4a5e2db444883b7871437f75ff1baae506fd Mon Sep 17 00:00:00 2001 From: Grace Wehner Date: Fri, 19 Jan 2024 13:59:49 -0800 Subject: [PATCH] add checking if state is failed for arc --- .pipelines/azure-pipeline-build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.pipelines/azure-pipeline-build.yml b/.pipelines/azure-pipeline-build.yml index 6b1d5962f..13f34fb1e 100644 --- a/.pipelines/azure-pipeline-build.yml +++ b/.pipelines/azure-pipeline-build.yml @@ -967,7 +967,8 @@ jobs: for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 do state=$(az k8s-extension show --name azuremonitor-metrics --cluster-name ci-dev-arc-wcus --resource-group ci-dev-arc-wcus --cluster-type connectedClusters | jq -r '.provisioningState') - if [ $state = "Succeeded" ] + # We want to wait in case the status is 'Creating' or 'Updating' because of another PR merged shortly before the current one. + if [ "$state" = "Succeeded" ] || [ "$state" = "Failed" ] then echo "Cluster is ready to install extension" exit 0