forked from whoisflynn/hotwax
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
31 lines (25 loc) · 1.31 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
---
sudo: required
language: python
services: docker
cache:
- pip
before_install:
- 'sudo docker pull kalilinux/kali:latest'
- 'sudo docker build --no-cache --rm --file=travis/Dockerfile.kali-latest --tag=kali-latest:ansible travis'
install:
- container_id=$(mktemp)
- 'sudo docker run --detach --privileged -v /sys/fs/cgroup:/sys/fs/cgroup:ro --volume="${PWD}":/root/hotwax:rw kali-latest:ansible > "${container_id}"'
- 'sudo docker exec "$(cat ${container_id})" ansible --version'
script:
- 'travis_wait 30 sudo docker exec "$(cat ${container_id})" env ANSIBLE_CONFIG="/root/hotwax/ansible.cfg" ANSIBLE_FORCE_COLOR=1 ansible-playbook -v /root/hotwax/playbook.yml --syntax-check'
- 'travis_wait 30 sudo docker exec "$(cat ${container_id})" env ANSIBLE_CONFIG="/root/hotwax/ansible.cfg" ANSIBLE_FORCE_COLOR=1 ansible-playbook -v /root/hotwax/playbook.yml'
# - >
# travis_wait 30 sudo docker exec "$(cat ${container_id})" env ANSIBLE_CONFIG="/root/hotwax/ansible.cfg" ANSIBLE_FORCE_COLOR=1 ansible-playbook -v /root/hotwax/playbook.yml
# | grep -q 'changed=0.*failed=0'
# && (echo 'Idempotence test: pass' && exit 0)
# || (echo 'Idempotence test: fail' && exit 1)
- 'sudo docker rm -f "$(cat ${container_id})"'
notifications:
webhooks: https://galaxy.ansible.com/api/v1/notifications/
email: false