This repository has been archived by the owner on Apr 2, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
38 lines (37 loc) · 2.28 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
---
language: python
sudo: required
dist: trusty
cache:
directories: [ '$HOME/lxc' ]
pip: true
env:
- LXC_DISTRO=debian LXC_RELEASE=jessie ES_VERSION=2.x
- LXC_DISTRO=ubuntu LXC_RELEASE=xenial ES_VERSION=2.x
- LXC_DISTRO=debian LXC_RELEASE=jessie ES_VERSION=5.x
- LXC_DISTRO=ubuntu LXC_RELEASE=xenial ES_VERSION=5.x
before_cache:
- sudo mkdir $HOME/lxc && sudo tar cf $HOME/lxc/cache.tar /var/cache/lxc/ && sudo chown $USER. $HOME/lxc/cache.tar
install:
- sudo tar xf $HOME/lxc/cache.tar -C / || true
- sudo apt-get install -y expect-dev
- pip install ansible
- ansible --version
- printf '[defaults]\nroles_path=../\ncallback_whitelist=profile_tasks' >ansible.cfg
- ansible-galaxy install srsp.oracle-java lae.travis-lxc
- ansible-playbook -vvv tests/install.yml -i tests/inventory
script:
- ansible-playbook tests/test.yml -i tests/inventory --syntax-check
- ansible-playbook tests/test.yml -i tests/inventory
- unbuffer ansible-playbook -vvv tests/test.yml -i tests/inventory >/tmp/idempotency.log 2>&1
- 'grep -A1 "PLAY RECAP" /tmp/idempotency.log | grep -qP "changed=0.*failed=0" &&
(echo "Idempotence: PASS"; exit 0) || (echo "Idempotence: FAIL"; cat /tmp/idempotency.log;
exit 1)'
- ansible -m uri -a 'url=http://{{ inventory_hostname }}:9200' -i tests/inventory all
- ansible -m uri -a 'url=http://{{ inventory_hostname }}:9200/_cluster/health' -i tests/inventory all
- ansible -m shell -a "PAGER=cat journalctl -xu elasticsearch" -i tests/inventory all -s
- ansible -m shell -a "cat /var/log/elasticsearch/*" -i tests/inventory all -s
notifications:
webhooks: https://galaxy.ansible.com/api/v1/notifications/
slack:
secure: UJQvEXSj1m0U/fExnUiThV7TBX8fysJZ8X1QOq2HzEJO35SvK5V/2lgTy/QNqKcAoWPPuh9+81CzRV27cyO8W4sY+Op0Ld29rmoDy3A2yo9UHk7B4H7Q7y2ELGNvIiQZ47gXSWeeRdDE4hHxaE/MHpLItUhw6omSmOf1X+nF/6PAZECQuIcaBGjdI0NMIqF/+SULJ8U/RVKP9jLYOUNM0qP9wgmXaCxw8iCwZlsnYWeXVCSS7pCUG7PTMuOior7VPQL78yG+s4M6fdX8cmrRrl2p2TTqJM+u5yHtDyRKZ01wuD8gTmoMzDlPgaobNb3JBbYAwGVmN9h80iuPqAovh3hxXgkMnNWUEamq6+AppM73y/kzOKSS4+1SIgKOkIQvqSW1BsgUH8XbQXgaylz2pMpnooPk5L/Hp2GF832yBz3xF/oCo3R/ySY3EfZLMte7pDvrBOZFDbCtluxGWNOHzBMXKUW+MjJEtpz9GEvcvhVxJyVD4hOFdrVPCODlScAKNCF2oO917oRj0H2g9Bups6SMYMHwBMt6gVb1L/1NJP4f3r5FjzfVL1g1LmRMd3PvUIBihyDUnPpksBazCgNKZi+6dJd8yFBowi983VthSLAzysmzAAFK9GzqIT3Yv1QURvc1JHH/PSEo36vNzNVFEaVSu9VojPzplMExs+XJuwQ=