-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.travis.yml
47 lines (47 loc) · 2.15 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
language: ruby
# dist: xenial #16.04
dist: bionic #18.04
sudo: required
rvm:
- 2.7
env:
global:
- VAGRANT_VERSION="2.2.8"
before_install:
- sudo apt-get -qq update
jobs:
include:
- stage: "build Vagrant and Libvirt with KVM or QEMU - bionic"
script:
- sudo apt-get install -y cpu-checker bridge-utils dnsmasq-base ebtables libvirt-bin libvirt-dev qemu-kvm qemu-utils ruby-dev
- sudo systemctl status libvirtd
- sudo libvirtd --version
- egrep -c '(vmx|svm)' /proc/cpuinfo #If 0 it means that your CPU doesn't support hardware virtualization.If 1 or more it does - but you still need to make sure that virtualization is enabled in the BIOS.
- sudo addgroup libvirtd
- sudo adduser $(id -un) libvirtd #ensure that your username is added to the group libvirtd
- sudo kvm-ok
- echo "============================================="
- echo "=============Installing Vagrant=============="
- sudo wget -nv https://releases.hashicorp.com/vagrant/${VAGRANT_VERSION}/vagrant_${VAGRANT_VERSION}_x86_64.deb
- sudo dpkg -i vagrant_${VAGRANT_VERSION}_x86_64.deb
- vagrant version
- echo "============================================="
- sudo vagrant plugin install vagrant-libvirt #The vagrant-libvirt plugin is required when using KVM on Linux
- sudo vagrant plugin install vagrant-mutate #Convert vagrant boxes to work with different providers
- sudo vagrant status
- sudo virsh list --all #show all running KVM/libvirt VMs
- sudo vagrant box add "centos/7" --provider=libvirt
- vagrant box list #veridy installed boxes
- vagrant status #Check the status of the VMs to see that none of them have been created yet
- sudo vagrant up --provider=libvirt
- sudo vagrant status
- sudo vagrant global-status
after_success:
- stage: Finalize
script: sudo vagrant destroy -f
notifications:
#email: false
email:
on_success: never # default: change
on_failure: always # default: always
webhooks: https://galaxy.ansible.com/api/v1/notifications/