From 2a3eed5f7392a10c5ea25ec1a77c56002dfc9539 Mon Sep 17 00:00:00 2001 From: Will Smith Date: Thu, 4 Jan 2024 15:28:27 -0600 Subject: [PATCH] Adding checks to see if rad CLI is installed or not (#917) Signed-off-by: willdavsmith --- .github/workflows/test.yaml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 7e8607ca..42f84644 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -315,7 +315,9 @@ jobs: - name: Delete app if: always() && steps.gen-id.outputs.RUN_TEST == 'true' run: | - rad app delete ${{ matrix.app }} -y + if command -v rad &> /dev/null; then + rad app delete ${{ matrix.app }} -y + fi - name: Delete Azure resource group if: always() && steps.gen-id.outputs.RUN_TEST == 'true' && steps.create-azure-resource-group.outcome == 'success' run: | @@ -334,7 +336,10 @@ jobs: if: always() && steps.gen-id.outputs.RUN_TEST == 'true' && matrix.credential == 'aws' run: | # Uninstall Radius from EKS cluster - rad uninstall kubernetes + # if rad cli exists + if command -v rad &> /dev/null; then + rad uninstall kubernetes + fi # Delete EKS cluster echo "Deleting EKS cluster: ${{ steps.gen-id.outputs.TEST_EKS_CLUSTER_NAME }}" eksctl delete cluster --name ${{ steps.gen-id.outputs.TEST_EKS_CLUSTER_NAME }} --region ${{ env.AWS_REGION }} --wait --force