forked from angrox/ansible-role-vsts-agent
-
Notifications
You must be signed in to change notification settings - Fork 6
/
.travis.yml
31 lines (23 loc) · 913 Bytes
/
.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
---
language: python
sudo: required
services:
- docker
env:
- OS_VERSION=7
before_install:
- sudo docker pull centos:${OS_VERSION}
install:
- sudo docker run --detach --volume="${PWD}":/etc/ansible/roles/vsts-agent: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
- sudo docker exec centos-${OS_VERSION} yum -y install jq
script:
# Check syntax of ansible playbook
- sudo docker exec centos-${OS_VERSION} ansible-playbook /etc/ansible/roles/vsts-agent/tests/test.yml --syntax-check
# Run ansible playbook
- sudo docker exec centos-${OS_VERSION} ansible-playbook /etc/ansible/roles/vsts-agent/tests/test.yml
after_script:
- sudo docker stop centos-${OS_VERSION}
notifications:
webhooks: https://galaxy.ansible.com/api/v1/notifications/