-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
34 lines (34 loc) · 1.37 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
language: python
python:
- "2.7"
- "3.6"
sudo: required
dist: trusty
cache:
directories: [ '$HOME/lxc' ]
pip: true
env:
- ANSIBLE_GIT_VERSION='devel' # 2.7.x development branch
- ANSIBLE_VERSION='<2.7.0' # 2.6.x
- ANSIBLE_VERSION='<2.6.0' # 2.5.x
matrix:
fast_finish: true
install:
- if [ "$ANSIBLE_GIT_VERSION" ]; then pip install "https://github.com/ansible/ansible/archive/${ANSIBLE_GIT_VERSION}.tar.gz";
else pip install "ansible${ANSIBLE_VERSION}"; fi
- ansible --version
- ansible-galaxy install lae.travis-lxc
- ansible-playbook tests/install.yml -i tests/inventory
- git archive --format tar.gz HEAD > idolactivities.archvsync.tar.gz && ansible-galaxy install
idolactivities.archvsync.tar.gz,$(git rev-parse HEAD),idolactivities.archvsync && rm idolactivities.archvsync.tar.gz
before_script: cd tests/
script:
- ansible-playbook -i inventory deploy.yml --syntax-check
- ANSIBLE_STDOUT_CALLBACK=debug ansible-playbook -i inventory deploy.yml
- 'ANSIBLE_STDOUT_CALLBACK=debug unbuffer ansible-playbook -vvi inventory
deploy.yml > play.log || (e=$?; cat play.log; exit $e); printf "Idempotence: ";
grep -A1 "PLAY RECAP" play.log | grep -qP "changed=0 .*failed=0 .*"
&& (echo "PASS"; exit 0) || (echo "FAIL"; cat play.log; exit 1)'
- ANSIBLE_STDOUT_CALLBACK=debug ansible-playbook -i inventory -v test.yml
notifications:
webhooks: https://galaxy.ansible.com/api/v1/notifications/