Maxime Guyot
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
16 additions and
0 deletions
-
.gitlab-ci/vagrant.yml
-
tests/scripts/vagrant_clean.sh
|
|
@ -12,6 +12,7 @@ molecule_tests: |
|
|
|
- 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: |
|
|
|
- ./tests/scripts/molecule_run.sh |
|
|
|
|
|
|
@ -26,6 +27,11 @@ molecule_tests: |
|
|
|
except: ['triggers'] |
|
|
|
image: quay.io/kubespray/vagrant:$KUBESPRAY_VERSION |
|
|
|
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: |
|
|
|
- vagrant up |
|
|
|
after_script: |
|
|
|
|
|
@ -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 |