forked from Graylog2/graylog-ansible-role
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
34 lines (29 loc) · 865 Bytes
/
.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
---
branches:
only:
- "master"
services:
- "docker"
env:
- distro: "centos7_22"
init: "/usr/sbin/init"
run_opts: "--privileged -v /sys/fs/cgroup:/sys/fs/cgroup:ro"
- distro: "jessie_22"
init: "/sbin/init"
run_opts: "--privileged -v /sys/fs/cgroup:/sys/fs/cgroup:ro"
- distro: "xenial_22"
init: "/lib/systemd/systemd"
run_opts: "--privileged --security-opt seccomp=unconfined -v /sys/fs/cgroup:/sys/fs/cgroup:ro"
before_script:
- >
docker build -t graylog-ansible-role-${distro}
-f tests/support/${distro}.Dockerfile tests/support
script:
- >
docker run -d -it -v $PWD:/role:ro
${run_opts} --name ${distro}
graylog-ansible-role-${distro} ${init}
- DOCKER_CONTAINER_ID=$(docker ps --filter name=${distro} -q)
- >
docker exec -it $DOCKER_CONTAINER_ID
/bin/bash -xec "bash -x run-tests.sh"