forked from Oefenweb/ansible-haproxy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
111 lines (101 loc) · 3.3 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
---
dist: xenial
language: python
cache:
timeout: 3600
pip: true
directories:
- $HOME/.docker
services:
- docker
# Distros
_distro_base: &distro_base
scenario_name: default
_ubuntu_xenial_build: &ubuntu_xenial_build
<<: *distro_base
docker_image_tag: ubuntu-xenial
CACHE_NAME: xenial
scenario_name: ubuntu_xenial
_ubuntu_bionic_build: &ubuntu_bionic_build
<<: *distro_base
docker_image_tag: ubuntu-bionic
CACHE_NAME: bionic
scenario_name: ubuntu_bionic
_centos_build: ¢os_build
<<: *distro_base
docker_image_tag: centos-7
CACHE_NAME: cent7
_opensuse_build: &opensuse_build
<<: *distro_base
docker_image_tag: opensuse-42.3
docker_command: /usr/lib/systemd/systemd
CACHE_NAME: suse43
# Ansible versions
_ansible_25_build: &ansible_25_build
ansible_version: "'ansible>=2.5,<2.6'"
_ansible_26_build: &ansible_26_build
ansible_version: "'ansible>=2.6,<2.7'"
env:
global:
- ANSIBLE_FORCE_COLOR=1
- docker_image=quay.io/loganv/docker-ci
- docker_command=/lib/systemd/systemd
- cache_dir=$HOME/.docker
- ansible_version=ansible
matrix:
fast_finish: true
include:
# ANSIBLE 2.5
- env:
<<: *ubuntu_xenial_build
<<: *ansible_25_build
- env:
<<: *ubuntu_bionic_build
<<: *ansible_25_build
- env:
<<: *centos_build
<<: *ansible_25_build
- env:
<<: *opensuse_build
<<: *ansible_25_build
# ANSIBLE 2.6
- env:
<<: *ubuntu_xenial_build
<<: *ansible_26_build
- env:
<<: *ubuntu_bionic_build
<<: *ansible_26_build
- env:
<<: *centos_build
<<: *ansible_26_build
- env:
<<: *opensuse_build
<<: *ansible_26_build
# ANSIBLE STABLE
- env:
<<: *ubuntu_xenial_build
- env:
<<: *ubuntu_bionic_build
- env:
<<: *centos_build
- env:
<<: *opensuse_build
before_install:
# Load cached docker images
- if [[ -d ${cache_dir} ]]; then ls ${cache_dir}/*.tar.gz | xargs -I {file} sh -c "zcat {file} | docker load"; fi
- if [[ -n ${docker_image_tag} ]]; then docker pull ${docker_image}:${docker_image_tag}; fi
install:
- pip install -r test-requirements.txt ${ansible_version}
script:
- molecule test -s ${scenario_name}
before_cache:
# Save tagged docker images
- >
mkdir -p ${cache_dir} && docker images -a --filter='dangling=false' --format '{{.Repository}}:{{.Tag}} {{.ID}}'
| xargs -n 2 -t sh -c 'test -e ${cache_dir}/$1.tar.gz || docker save $0 | gzip -2 > ${cache_dir}/$1.tar.gz'
notifications:
email: false
slack:
rooms:
# yamllint disable-line rule:line-length
secure: F+5nAYLL5CbeGpMaRLhadmXMREDXRXn0VkhmedtD/m+zMQJheUzdB+mnReGJoADDfUULUrFKouQiWhWRp+un36jbq7SfQz5fLtZLmhGpdyClGOcex49WO4i4vm9CkuWMh48i7MMn17irNreHSG40nUllVsmsMUdutevgBAlM8SkYtwHGaEtCkFQPPipahs8vrBpK767zRjez87QTuJyRxjAyBvjG+GGuLL8B430/ywzajbU0AYj+SctoYUi9MTpAjLAZTXdbcUSk/84ggTbuXkuXymSyC+9h2aJhI3Poy00jwJR6rZHMTrdOk/U6RrqIcSMniUWvU/ve85cTFCigQr5Vrb97jcQQ3AFMUuosZlVWMMjyoC/Mp3n6aztd11Op9LKeQ+xSlIKkpvGpWTr2uuX4/teGzK52NZM2JV3egZxEPKrPjQ0CnAho/DhGPN7n9qNKUAucaM51qV5rO3xVjd7V8e5coKxWq+3FqT3cdOJaAXsO9ScCPegg76TOxhu2r7CDW4keTvNjZwpfisYJCCueKQ44v1HxJN+gDk89Kpl3sdqdcmRqgq7Kc0arDsZgCPbm/zo38pnHaTWXqBlMUnxS51+HSzSODTqhdpGspelxRSHBuTY/JrhzyNVdacwaZkbKa4GUSG3HPDQMXdmjZk+yAf2hGsgLgdmkCo5GZyU=