2019-02-04 16:56:15 +01:00
|
|
|
---
|
|
|
|
sudo: required
|
|
|
|
|
|
|
|
env:
|
|
|
|
- distribution: fedora
|
|
|
|
version: 29
|
|
|
|
- distribution: fedora
|
|
|
|
version: 28
|
|
|
|
- distribution: ubuntu
|
|
|
|
version: bionic
|
|
|
|
- distribution: debian
|
|
|
|
version: stretch
|
|
|
|
|
|
|
|
services:
|
|
|
|
- docker
|
|
|
|
|
|
|
|
before_install:
|
|
|
|
- 'sudo docker pull ${distribution}:${version}'
|
|
|
|
- 'sudo docker build --no-cache --rm --file=travis/Dockerfile.${distribution}-${version} --tag=${distribution}-${version}:ansible travis'
|
|
|
|
|
|
|
|
script:
|
|
|
|
- container_id=$(mktemp)
|
|
|
|
- 'sudo docker run --detach --privileged -v /sys/fs/cgroup:/sys/fs/cgroup:ro --volume="${PWD}":/etc/ansible/roles/travis_test:ro ${distribution}-${version}:ansible > "${container_id}"'
|
|
|
|
- 'sudo docker exec "$(cat ${container_id})" env ANSIBLE_FORCE_COLOR=1 ansible-playbook -v /etc/ansible/roles/travis_test/travis/test.yml --syntax-check'
|
|
|
|
- 'sudo docker exec "$(cat ${container_id})" env ANSIBLE_FORCE_COLOR=1 ansible-playbook -v /etc/ansible/roles/travis_test/travis/test.yml'
|
2019-02-04 17:27:33 +01:00
|
|
|
- 'sudo docker exec "$(cat ${container_id})" env ANSIBLE_FORCE_COLOR=1 ansible-playbook -v /etc/ansible/roles/travis_test/travis/test.yml'
|
2019-02-04 16:56:15 +01:00
|
|
|
- 'sudo docker rm -f "$(cat ${container_id})"'
|