From 7d38b4a3dbd335c155836c4413987589a64e6f3c Mon Sep 17 00:00:00 2001 From: Derek Nola Date: Tue, 10 Oct 2023 09:54:51 -0700 Subject: [PATCH] E2E Domain Drone Cleanup (#8579) * Cleanup inactive vm domains * Have e2e depend on amd64 pipeline Signed-off-by: Derek Nola --- .drone.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index bcfe2e19dc..83c6d0e744 100644 --- a/.drone.yml +++ b/.drone.yml @@ -710,6 +710,9 @@ platform: clone: retries: 3 +depends_on: +- amd64 + steps: - name: skipfiles image: plugins/git @@ -752,7 +755,8 @@ steps: - mkdir -p dist/artifacts - cp /tmp/artifacts/* dist/artifacts/ - docker stop registry && docker rm registry - # Cleanup any VMs running, happens if a previous test panics + # Cleanup VMs running, happens if a previous test panics + # Cleanup inactive domains, happens if previous test is canceled - | VMS=$(virsh list --name | grep '_server-\|_agent-' || true) if [ -n "$VMS" ]; then @@ -762,6 +766,13 @@ steps: virsh undefine $vm --remove-all-storage done fi + VMS=$(virsh list --name --inactive | grep '_server-\|_agent-' || true) + if [ -n "$VMS" ]; then + for vm in $VMS + do + virsh undefine $vm + done + fi - docker run -d -p 5000:5000 -e REGISTRY_PROXY_REMOTEURL=https://registry-1.docker.io --name registry registry:2 - cd tests/e2e/validatecluster - vagrant destroy -f