aboutsummaryrefslogtreecommitdiffhomepage
path: root/.travis.yml
diff options
context:
space:
mode:
authorLarry Smith Jr <mrlesmithjr@gmail.com>2018-12-19 09:50:10 -0500
committerLarry Smith Jr <mrlesmithjr@gmail.com>2018-12-20 00:55:34 -0500
commit4353d29ae004cea98d3a80ef941aaa155c84bf9a (patch)
tree964561a22ead9ec868e525ce7f132ecc6d8efaea /.travis.yml
parentc760a03786a2247c14129dfd22c0e0fe1357f094 (diff)
downloadansible-rabbitmq-4353d29ae004cea98d3a80ef941aaa155c84bf9a.tar.gz
ansible-rabbitmq-4353d29ae004cea98d3a80ef941aaa155c84bf9a.tar.zst
ansible-rabbitmq-4353d29ae004cea98d3a80ef941aaa155c84bf9a.zip
Cleaned up Vagrant and merged new commits
Diffstat (limited to '.travis.yml')
-rw-r--r--.travis.yml75
1 files changed, 58 insertions, 17 deletions
diff --git a/.travis.yml b/.travis.yml
index 36bbf62..ef52f88 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -3,27 +3,68 @@ language: python
3python: "2.7" 3python: "2.7"
4 4
5# Use the new container infrastructure 5# Use the new container infrastructure
6sudo: false 6sudo: required
7 7
8# Install ansible 8services:
9addons: 9 - docker
10 apt:
11 packages:
12 - python-pip
13 10
14install: 11env:
15 # Install ansible 12 - distribution: centos
16 - pip install ansible 13 init: /usr/lib/systemd/systemd
14 version: 7
15 - distribution: fedora
16 init: /usr/lib/systemd/systemd
17 version: 29
18 - distribution: fedora
19 init: /usr/lib/systemd/systemd
20 version: 28
21 - distribution: fedora
22 init: /usr/lib/systemd/systemd
23 version: 27
24 - distribution: fedora
25 init: /usr/lib/systemd/systemd
26 version: 26
27 - distribution: fedora
28 init: /usr/lib/systemd/systemd
29 version: 25
30 - distribution: fedora
31 init: /usr/lib/systemd/systemd
32 version: 24
33 - distribution: ubuntu
34 init: /lib/systemd/systemd
35 version: bionic
36 - distribution: ubuntu
37 init: /lib/systemd/systemd
38 version: xenial
39 - distribution: ubuntu
40 init: /sbin/init
41 version: trusty
42 - distribution: debian
43 init: /lib/systemd/systemd
44 version: stretch
45 - distribution: debian
46 init: /lib/systemd/systemd
47 version: jessie
17 48
18 # Check ansible version 49before_install:
19 - ansible --version 50 - "sudo pip install yamllint"
20 51 - yamllint -c .yamllint.yml .
21 # Create ansible.cfg with correct roles_path 52 - "sudo docker pull ${distribution}:${version}"
22 - printf '[defaults]\nroles_path=../' >ansible.cfg 53 - "sudo docker build --no-cache --rm --file=tests/Dockerfile.${distribution}-${version} --tag=${distribution}-${version}:ansible tests"
23 54
24script: 55script:
25 # Basic role syntax check 56 - container_id=$(mktemp)
26 - ansible-playbook tests/test.yml -i tests/inventory --syntax-check 57 - role_name="ansible-rabbitmq"
58 - 'sudo docker run --detach --privileged -v /sys/fs/cgroup:/sys/fs/cgroup:ro --volume="${PWD}":/etc/ansible/roles/${role_name}:ro ${distribution}-${version}:ansible ${init} > "${container_id}"'
59 - 'sudo docker exec "$(cat ${container_id})" env ANSIBLE_FORCE_COLOR=1 ansible-lint -c /.ansible-lint /etc/ansible/roles/${role_name}/tests/test.yml'
60 - 'sudo docker exec "$(cat ${container_id})" env ANSIBLE_FORCE_COLOR=1 ansible-playbook -v /etc/ansible/roles/${role_name}/tests/test.yml --syntax-check'
61 - 'sudo docker exec "$(cat ${container_id})" env ANSIBLE_FORCE_COLOR=1 ansible-playbook -v /etc/ansible/roles/${role_name}/tests/test.yml'
62 - >
63 sudo docker exec "$(cat ${container_id})" env ANSIBLE_FORCE_COLOR=1 ansible-playbook -v /etc/ansible/roles/${role_name}/tests/test.yml
64 | grep -q 'changed=0.*failed=0'
65 && (echo 'Idempotence test: pass' && exit 0)
66 || (echo 'Idempotence test: fail' && exit 1)
67 - 'sudo docker rm -f "$(cat ${container_id})"'
27 68
28notifications: 69notifications:
29 webhooks: https://galaxy.ansible.com/api/v1/notifications/ \ No newline at end of file 70 webhooks: https://galaxy.ansible.com/api/v1/notifications/