-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.travis.yml
40 lines (30 loc) · 1.33 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
---
dist: bionic
language: python
cache:
directories:
- /home/travis/.vagrant.d/boxes
install:
- curl -Os https://raw.githubusercontent.com/Seravo/gnitpick/master/gnitpick.py
- pip install ansible
# Install libvrt & KVM
# See https://github.com/jonashackt/vagrant-travisci-libvrt/blob/master/.travis.yml and https://github.com/alvistack/ansible-role-virtualbox/blob/master/.travis.yml
- sudo apt-get update && sudo apt-get install -y bridge-utils dnsmasq-base ebtables libvirt-bin libvirt-dev qemu-kvm qemu-utils ruby-dev ansible
# Download Vagrant & Install Vagrant package
- sudo wget -nv https://releases.hashicorp.com/vagrant/2.2.7/vagrant_2.2.7_x86_64.deb
- sudo dpkg -i vagrant_2.2.7_x86_64.deb
# Vagrant correctly installed?
- vagrant --version
# Install vagrant-libvirt Vagrant plugin
- sudo vagrant plugin install vagrant-libvirt
script:
# Abort immediately if one step fails
# https://github.com/travis-ci/travis-ci/issues/1066#issuecomment-32415710
- set -e
# Run our custom Git commit checks
- python3 ./gnitpick.py --target-repository https://github.com/seravo/wp-vagrant.git
# Lint Ansible
- sed 's|ubuntu/bionic64|generic/ubuntu1804|' -i Vagrantfile
- ansible-playbook --syntax-check -i hosts/development site.yml
# Build and test everything
- sudo vagrant up --provision --provider=libvirt