This repository was archived by the owner on Apr 14, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy path.travis.yml
52 lines (46 loc) · 1.61 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
#
# Copyright (c) 2015 by Delphix. All rights reserved.
#
---
language: python
python: "2.7"
env:
- ANSIBLE_VERSION=latest
- ANSIBLE_VERSION=1.9.4
- ANSIBLE_VERSION=1.9.3
- ANSIBLE_VERSION=1.9.2
- ANSIBLE_VERSION=1.9.1
- ANSIBLE_VERSION=1.9.0.1
- ANSIBLE_VERSION=1.8.4
- ANSIBLE_VERSION=1.8.3
- ANSIBLE_VERSION=1.8.2
- ANSIBLE_VERSION=1.8.1
- ANSIBLE_VERSION=1.8
sudo: required
services:
- docker
before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq python-apt ruby
install:
- if [ "$ANSIBLE_VERSION" = "latest" ]; then pip install ansible; else pip install ansible==$ANSIBLE_VERSION; fi
- sudo gem install busser --no-ri --no-rdoc
- sudo busser plugin install busser-bats
script:
- echo localhost > inventory
- ansible-galaxy install -r requirements-test.txt -p ../
- ansible-playbook -i inventory --syntax-check test/integration/default/default.yml
- ansible-playbook -i inventory --connection=local --sudo -vvvv test/integration/default/default.yml
#
# Run the role/playbook again, checking to make sure it's idempotent. Ansible
# will always return "changed=2" because the "angstwad.docker_ubuntu" role uses
# pip to update "docker-py" and "docker-compose" and the status returned from
# pip is meaningless.
#
- >
ansible-playbook -i inventory --connection=local --sudo -vvvv test/integration/default/default.yml
| grep -q 'changed=2.*failed=0'
&& (echo 'Idempotence test: pass' && exit 0)
|| (echo 'Idempotence test: fail' && exit 1)
# Run the Test Kitchen tests.
- sudo /opt/busser/vendor/bats/bin/bats ./test/integration/default/bats/*.bats