Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix so cleanup-test-env script continues if delete of one project fails #1516

Merged
merged 1 commit into from
Oct 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions scripts/cleanup-test-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ echo "${projects}" | jq -c '.results[].id' | while read -r id; do
fi

echo "Deleting projectId ${clean_project_id}"
# This command will fail if the project has a cluster inside
atlas project delete "${clean_project_id}" --force
# This command can fail if project has a cluster, a private endpoint, or general failure. The echo command always succeeds so the subshell will succeed and continue
(
atlas project delete "${clean_project_id}" --force || \
echo "Failed to delete project with ID ${clean_project_id}"
)
done
Loading