-
Notifications
You must be signed in to change notification settings - Fork 5
/
.travis.yml
57 lines (47 loc) · 2.06 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
48
49
50
51
52
53
54
55
56
57
---
os: linux
dist: bionic
language: shell
env:
jobs:
- MOLECULE_SCENARIO_NAME="centos-7"
- MOLECULE_SCENARIO_NAME="suse-15"
- MOLECULE_SCENARIO_NAME="ubuntu-16.04"
- MOLECULE_SCENARIO_NAME="ubuntu-18.04"
- MOLECULE_SCENARIO_NAME="ubuntu-19.10"
jobs:
allow_failures:
- env: MOLECULE_SCENARIO_NAME="centos-7"
- env: MOLECULE_SCENARIO_NAME="suse-15"
before_install:
- |
curl -Os https://releases.hashicorp.com/vagrant/2.2.7/vagrant_2.2.7_x86_64.deb
curl -Os https://releases.hashicorp.com/vagrant/2.2.7/vagrant_2.2.7_SHA256SUMS
curl -Os https://releases.hashicorp.com/vagrant/2.2.7/vagrant_2.2.7_SHA256SUMS.sig
gpg --receive-key 51852D87348FFC4C
gpg --verify vagrant_2.2.7_SHA256SUMS.sig vagrant_2.2.7_SHA256SUMS
sha256sum -c vagrant_2.2.7_SHA256SUMS 2>&1 | grep OK
sudo apt-get update && sudo apt-get install -y bridge-utils dnsmasq-base ebtables libvirt-bin libvirt-dev qemu-kvm qemu-utils ruby-dev
sudo dpkg -i vagrant_2.2.7_x86_64.deb
sudo vagrant plugin install vagrant-libvirt
- |
sudo apt-get -y purge python3-openssl && sudo apt-get -y autoremove
sudo apt-get update && sudo apt-get install -y ca-certificates curl gcc iproute2 pwgen python3 python3-dev sudo
curl -skL https://bootstrap.pypa.io/get-pip.py | sudo -H python3
sudo -H pip3 install --upgrade --ignore-installed --requirement requirements.txt
install:
- |
export ROLE=$(echo $TRAVIS_REPO_SLUG | sed 's/^.*\/ansible-role-/\//g')
mkdir -p $HOME/.ansible/roles
ln -s $TRAVIS_BUILD_DIR $HOME/.ansible/roles/$ROLE
script:
- |
source ./scripts/run-tests.sh \
&& sudo -E molecule dependency -s $MOLECULE_SCENARIO_NAME \
&& sudo -E molecule lint -s $MOLECULE_SCENARIO_NAME \
&& sudo -E molecule syntax -s $MOLECULE_SCENARIO_NAME \
&& sudo -E molecule converge -s $MOLECULE_SCENARIO_NAME \
&& travis_wait 120 sudo -E molecule idempotence -s $MOLECULE_SCENARIO_NAME \
&& sudo -E molecule verify -s $MOLECULE_SCENARIO_NAME
notifications:
webhooks: https://galaxy.ansible.com/api/v1/notifications/