-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
64 lines (57 loc) · 2.04 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
58
59
60
61
62
63
64
# Copyright 2017 Red Hat, Inc. and/or its affiliates
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
sudo: required
dist: trusty
group: deprecated-2017Q3
language: python
python:
- "2.7"
- "3.6"
env:
matrix:
- OS_TYPE=centos OS_VERSION=7
- OS_TYPE=centos OS_VERSION=6
global:
- PATH="/usr/bin:$PATH"
notifications:
on_success: always # default: change
on_failure: never
before_install:
- deactivate
- sudo apt-get update -qq
- sudo apt-get install -y -o Dpkg::Options::="--force-confnew" docker-ce
- sudo apt install nmap
- echo 'DOCKER_OPTS="-H tcp://127.0.0.1:2375 -H unix:///var/run/docker.sock -s devicemapper"' | sudo tee /etc/default/docker > /dev/null
- sudo service docker restart
- sleep 5
- sudo docker pull centos:centos${OS_VERSION}
install:
- sudo pip install docker-py
- sudo apt-get install -y sshpass software-properties-common python-software-properties
- sudo apt-add-repository -y ppa:ansible/ansible
- sudo apt-get update -qq
- sudo apt-get install -y ansible
- sudo rm /usr/bin/python && sudo ln -s /usr/bin/python2.7 /usr/bin/python
- ansible-galaxy install -r test/requirements.yml -p test/roles/
# Create ansible.cfg with correct roles_path
- printf '[defaults]\nroles_path=test/roles/' > ansible.cfg
before_script: # configure a headless display to test plot generation
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- sleep 3 # give xvfb some time to start
script:
- make test
script:
# Basic role syntax check
- ansible-playbook tests/test.yml -i tests/inventory --syntax-check