Unverified Commit 222805cb authored by Derek Nola's avatar Derek Nola Committed by GitHub

[Release-1.25] E2E Domain Drone Cleanup (#8584)

* E2E Domain Drone Cleanup (#8579) * Cleanup inactive vm domains * Have e2e depend on amd64 pipeline Signed-off-by: 's avatarDerek Nola <derek.nola@suse.com>
parent d19260dc
...@@ -579,6 +579,12 @@ platform: ...@@ -579,6 +579,12 @@ platform:
os: linux os: linux
arch: amd64 arch: amd64
clone:
retries: 3
depends_on:
- amd64
steps: steps:
- name: build-e2e-image - name: build-e2e-image
image: rancher/dapper:v0.5.0 image: rancher/dapper:v0.5.0
...@@ -604,7 +610,8 @@ steps: ...@@ -604,7 +610,8 @@ steps:
- mkdir -p dist/artifacts - mkdir -p dist/artifacts
- cp /tmp/artifacts/* dist/artifacts/ - cp /tmp/artifacts/* dist/artifacts/
- docker stop registry && docker rm registry - 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) VMS=$(virsh list --name | grep '_server-\|_agent-' || true)
if [ -n "$VMS" ]; then if [ -n "$VMS" ]; then
...@@ -614,6 +621,13 @@ steps: ...@@ -614,6 +621,13 @@ steps:
virsh undefine $vm --remove-all-storage virsh undefine $vm --remove-all-storage
done done
fi 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 - docker run -d -p 5000:5000 -e REGISTRY_PROXY_REMOTEURL=https://registry-1.docker.io --name registry registry:2
- cd tests/e2e/validatecluster - cd tests/e2e/validatecluster
- vagrant destroy -f - vagrant destroy -f
......
...@@ -57,6 +57,11 @@ jobs: ...@@ -57,6 +57,11 @@ jobs:
run: vagrant plugin install vagrant-k3s vagrant-reload run: vagrant plugin install vagrant-k3s vagrant-reload
- name: "Vagrant Up" - name: "Vagrant Up"
run: vagrant up run: vagrant up
- name: On Failure, Dump VM logs
if: ${{ failure() }}
run: |
logsDir=$(vboxmanage list vms --long | grep Logs | awk '{print $3" "$4}')
cat "$logsDir"/VBox.log
- name: "K3s Prepare" - name: "K3s Prepare"
run: vagrant provision --provision-with=k3s-prepare run: vagrant provision --provision-with=k3s-prepare
- name: ⏬ "K3s Install" - name: ⏬ "K3s Install"
......
...@@ -59,6 +59,11 @@ jobs: ...@@ -59,6 +59,11 @@ jobs:
run: vagrant plugin install vagrant-k3s run: vagrant plugin install vagrant-k3s
- name: "Vagrant Up Install K3s" - name: "Vagrant Up Install K3s"
run: vagrant up run: vagrant up
- name: On Failure, Dump VM logs
if: ${{ failure() }}
run: |
logsDir=$(vboxmanage list vms --long | grep Logs | awk '{print $3" "$4}')
cat "$logsDir"/VBox.log
- name: " Node" - name: " Node"
run: vagrant provision --provision-with=k3s-wait-for-node run: vagrant provision --provision-with=k3s-wait-for-node
- name: " CoreDNS" - name: " CoreDNS"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment