Skip to content

Commit

Permalink
Merge pull request #1290 from jmclong/fix-verify-examples
Browse files Browse the repository at this point in the history
[V2] fix: Fix verify-examples.sh leak resources created 🐞
  • Loading branch information
k8s-ci-robot authored Apr 19, 2022
2 parents 7644adb + ab613ca commit 1e58f82
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion hack/verify-examples.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,17 @@ if [[ "$1" == "windows" ]]; then
)
fi

cleanup_examples() {
for EXAMPLE in "${EXAMPLES[@]}"; do
echo "Attempting deletion of \"$EXAMPLE\""
kubectl delete -f "$EXAMPLE" --ignore-not-found
done
}

trap cleanup_examples EXIT

for EXAMPLE in "${EXAMPLES[@]}"; do
rollout_and_wait $EXAMPLE
rollout_and_wait "$EXAMPLE"
done

echo "deployment examples running completed."

0 comments on commit 1e58f82

Please sign in to comment.