From 9264ab26ec8e3e66a25eab2a85972b869892399d Mon Sep 17 00:00:00 2001 From: shiva kumar Date: Thu, 19 Dec 2024 19:12:45 +0530 Subject: [PATCH] unused aws instace and vpcs cleanup Signed-off-by: shiva kumar --- .github/workflows/awscleanup.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/awscleanup.yaml b/.github/workflows/awscleanup.yaml index e0797fb2..55f91831 100644 --- a/.github/workflows/awscleanup.yaml +++ b/.github/workflows/awscleanup.yaml @@ -58,13 +58,20 @@ jobs: continue fi + echo "SHIVA $response" + echo "$response" | jq -r " + .jobs? // [] | + map(select(.status != \"completed\")) | + length") + echo "SHIVA1" is_jobs_not_completed=$(echo "$response" | jq -r " .jobs? // [] | map(select(.status != \"completed\")) | length") + echo "SHIVA2 $is_jobs_not_completed" if [[ "$is_jobs_not_completed" -eq 0 ]]; then - echo "Holodeck e2e Job status is not in running stage , Delete the dependent resources" + echo "Holodeck e2e Job status is not in running stage , Delete the vpc $vpc and dependent resources" scripts/awscleanup.sh $vpc fi done