forked from RocketChat/Rocket.Chat.Ansible
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
73 lines (66 loc) · 2.01 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
---
sudo: required
dist: trusty
language: generic
env:
- >
dist=debian
ver=8
container_id=$(mktemp)
init=/sbin/init
run_opts="--privileged --volume=/sys/fs/cgroup:/sys/fs/cgroup:ro"
EXTRA_VARS='{"role_name":"Rocket.Chat.Ansible","host_name":"localhost"}'
VERBOSE='-vv'
- >
dist=centos
ver=7
container_id=$(mktemp)
init=/usr/lib/systemd/systemd
run_opts="--privileged --volume=/sys/fs/cgroup:/sys/fs/cgroup:ro"
EXTRA_VARS='{"role_name":"Rocket.Chat.Ansible","host_name":"localhost"}'
VERBOSE='-vv'
- >
dist=ubuntu
ver=14.04
container_id=$(mktemp)
init=/sbin/init
run_opts=""
EXTRA_VARS='{"role_name":"Rocket.Chat.Ansible","host_name":"localhost"}'
VERBOSE='-vv'
- >
dist=ubuntu
ver=16.04
container_id=$(mktemp)
init=/sbin/init
run_opts="--privileged --volume=/sys/fs/cgroup:/sys/fs/cgroup:ro"
EXTRA_VARS='{"role_name":"Rocket.Chat.Ansible","host_name":"localhost"}'
VERBOSE='-vv'
- >
dist=ubuntu
ver=18.04
container_id=$(mktemp)
init=/sbin/init
run_opts="--privileged --volume=/sys/fs/cgroup:/sys/fs/cgroup:ro"
EXTRA_VARS='{"role_name":"Rocket.Chat.Ansible","host_name":"localhost"}'
VERBOSE='-vv'
services:
- docker
before_install:
- sudo docker build --rm=true
--file="tests/Dockerfile.${dist}-${ver}"
--tag="${dist}:ansible" tests
before_script:
- sudo docker run --detach
--volume="${PWD}:/etc/ansible/roles/Rocket.Chat.Ansible:ro"
${run_opts} "${dist}:ansible" "${init}" > "${container_id}"
script:
- sudo docker exec --tty "$(cat ${container_id})"
env TERM=xterm ansible-playbook
/etc/ansible/roles/Rocket.Chat.Ansible/tests/provision.yml
--extra-vars="$EXTRA_VARS" $VERBOSE --syntax-check
- sudo docker exec --tty "$(cat ${container_id})"
env TERM=xterm ansible-playbook
/etc/ansible/roles/Rocket.Chat.Ansible/tests/provision.yml
--extra-vars="$EXTRA_VARS" $VERBOSE
notifications:
webhooks: https://galaxy.ansible.com/api/v1/notifications/