-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
35 lines (27 loc) · 1.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
---
language: python
sudo: required
services:
- docker
env:
- OS_VERSION=7
- OS_VERSION=6
before_install:
- sudo docker pull centos:${OS_VERSION}
install:
- sudo docker run --detach --volume="${PWD}":/etc/ansible/roles/python-scl:ro --name centos-${OS_VERSION} centos:${OS_VERSION} sleep 300
- sudo docker exec centos-${OS_VERSION} yum -y install epel-release
- sudo docker exec centos-${OS_VERSION} yum -y install ansible
script:
# Check syntax of ansible playbook
- sudo docker exec centos-${OS_VERSION} ansible-playbook /etc/ansible/roles/python-scl/tests/test.yml --syntax-check
# Run ansible playbook
- sudo docker exec centos-${OS_VERSION} ansible-playbook /etc/ansible/roles/python-scl/tests/test.yml
# check if rpms are present
- sudo docker exec centos-${OS_VERSION} rpm -qa | grep rh-python
# check profile import task
- sudo docker exec centos-${OS_VERSION} cat /etc/profile.d/scl-python.sh | grep enable
after_script:
- sudo docker stop centos-${OS_VERSION}
notifications:
webhooks: https://galaxy.ansible.com/api/v1/notifications/