Skip to content

Commit

Permalink
E2E Domain Drone Cleanup (k3s-io#8579)
Browse files Browse the repository at this point in the history
* Cleanup inactive vm domains
* Have e2e depend on amd64 pipeline

Signed-off-by: Derek Nola <derek.nola@suse.com>
  • Loading branch information
dereknola committed Oct 10, 2023
1 parent 8acba4a commit 2e97a1d
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -691,6 +691,12 @@ platform:
os: linux
arch: amd64

clone:
retries: 3

depends_on:
- amd64

steps:
- name: skipfiles
image: plugins/git
Expand Down Expand Up @@ -732,7 +738,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
Expand All @@ -742,6 +749,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
Expand Down

0 comments on commit 2e97a1d

Please sign in to comment.