From 2325970518e5406deb4d2e040af2d2bfca8565c7 Mon Sep 17 00:00:00 2001 From: ChristopherHX Date: Wed, 18 Mar 2026 21:46:02 +0000 Subject: [PATCH] another attempt --- .gitea/workflows/e2e.yml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/e2e.yml b/.gitea/workflows/e2e.yml index 64e32c8..fade19f 100644 --- a/.gitea/workflows/e2e.yml +++ b/.gitea/workflows/e2e.yml @@ -18,10 +18,15 @@ jobs: curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" install kubectl /usr/local/bin/ + - name: Cleanup any previous kind cluster (best-effort) + if: always() + run: | + kind delete cluster --name test-cluster || true + docker ps -a --filter "name=test-cluster" -q | xargs -r docker rm -f || true + docker network ls --filter "name=kind" -q | xargs -r docker network rm || true + - name: Create kind cluster run: | - echo "Try to Delete old cluster" - kind delete cluster --name test-cluster || echo "No cluster Deleted" kind create cluster --name test-cluster - name: Attach kind control-plane to job network and wait @@ -58,6 +63,9 @@ jobs: kubectl get nodes kubectl get pods -A - - name: Delete Cluster + - name: Cleanup kind cluster (best-effort) if: always() - run: kind delete cluster --name test-cluster + run: | + kind delete cluster --name test-cluster || true + docker ps -a --filter "name=test-cluster" -q | xargs -r docker rm -f || true + docker network ls --filter "name=kind" -q | xargs -r docker network rm || true