mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-04-09 03:59:23 -02:30
Cleanup Vagrant VMs before molecule and vagrant CI (#6009)
This commit is contained in:
@@ -12,6 +12,7 @@ molecule_tests:
|
|||||||
- apt-get update && apt-get install -y python3-pip
|
- apt-get update && apt-get install -y python3-pip
|
||||||
- update-alternatives --install /usr/bin/python python /usr/bin/python3 10
|
- update-alternatives --install /usr/bin/python python /usr/bin/python3 10
|
||||||
- python -m pip install -r tests/requirements.txt
|
- python -m pip install -r tests/requirements.txt
|
||||||
|
- ./tests/scripts/vagrant_clean.sh
|
||||||
script:
|
script:
|
||||||
- ./tests/scripts/molecule_run.sh
|
- ./tests/scripts/molecule_run.sh
|
||||||
|
|
||||||
@@ -26,6 +27,11 @@ molecule_tests:
|
|||||||
except: ['triggers']
|
except: ['triggers']
|
||||||
image: quay.io/kubespray/vagrant:$KUBESPRAY_VERSION
|
image: quay.io/kubespray/vagrant:$KUBESPRAY_VERSION
|
||||||
services: []
|
services: []
|
||||||
|
before_script:
|
||||||
|
- apt-get update && apt-get install -y python3-pip
|
||||||
|
- update-alternatives --install /usr/bin/python python /usr/bin/python3 10
|
||||||
|
- python -m pip install -r tests/requirements.txt
|
||||||
|
- ./tests/scripts/vagrant_clean.sh
|
||||||
script:
|
script:
|
||||||
- vagrant up
|
- vagrant up
|
||||||
after_script:
|
after_script:
|
||||||
|
|||||||
10
tests/scripts/vagrant_clean.sh
Executable file
10
tests/scripts/vagrant_clean.sh
Executable file
@@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -euxo pipefail
|
||||||
|
|
||||||
|
# Cleanup vagrant VMs to avoid name conflicts
|
||||||
|
|
||||||
|
for i in $(virsh list --name)
|
||||||
|
do
|
||||||
|
virsh destroy "$i"
|
||||||
|
virsh undefine "$i"
|
||||||
|
done
|
||||||
Reference in New Issue
Block a user