forked from gdcc/dataverse-ansible
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.travis.yml
More file actions
17 lines (14 loc) · 687 Bytes
/
.travis.yml
File metadata and controls
17 lines (14 loc) · 687 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
---
sudo: required
services:
- docker
script:
# Build the testing container.
- sudo docker build --rm=true --tag=dataverse-ansible tests/
# Run the container in the background. We can't just fire Ansible directly
# b/c the role manipulates services which must be running in the container.
- sudo docker run --detach --privileged --volume="${PWD}/tests:/etc/ansible" --volume="${PWD}:/etc/ansible/roles/dataverse" --volume=/sys/fs/cgroup:/sys/fs/cgroup:ro dataverse-ansible > /tmp/cid
# Check playbook syntax
- sudo docker exec $(cat /tmp/cid) ansible-playbook site.yml --syntax-check
# Run the playbook
- sudo docker exec $(cat /tmp/cid) ansible-playbook site.yml