Fixed travis build

This commit is contained in:
Sergei Antipov 2016-04-17 19:47:22 +06:00
parent 25c7cec6f2
commit e5f2d18095
1 changed files with 13 additions and 13 deletions

View File

@ -6,12 +6,12 @@ env:
- > - >
distribution=ubuntu-upstart distribution=ubuntu-upstart
version=14.04 version=14.04
- > # - >
distribution=ubuntu-upstart # distribution=ubuntu-upstart
version=12.04 # version=12.04
- > # - >
distribution=debian # distribution=debian
version=7 # version=7
services: services:
- docker - docker
@ -20,22 +20,22 @@ before_install:
- sudo apt-get update - sudo apt-get update
# Latest Ansible install # Latest Ansible install
- sudo apt-add-repository -y ppa:ansible/ansible - sudo apt-add-repository -y ppa:ansible/ansible
- sudo apt-get update -o Dir::Etc::sourcelist="sources.list.d/ansible-ansible-precise.list" \ - sudo apt-get update
-o Dir::Etc::sourceparts="-" -o APT::Get::List-Cleanup="0"
- sudo apt-get install ansible python-pip -y - sudo apt-get install ansible python-pip -y
- sudo pip install docker-py - sudo pip install docker-py==1.5.0
# Pull docker image # Pull docker image
- docker pull ${distribution}:${version} - sudo docker pull ${distribution}:${version}
- sudo ln -s ${PWD} /etc/ansible/roles/greendayonfire.mongodb
script: script:
- ansible-playbook -i tests/hosts tests/site.yml -e target=mongo1 - sudo ansible-playbook -i tests/hosts tests/site.yml -e target=mongo1
# Idempotence test # Idempotence test
- > - >
ansible-playbook -i tests/hosts tests/site.yml -e target=mongo1 sudo ansible-playbook -i tests/hosts tests/site.yml -e target=mongo1
| grep -q 'changed=0.*failed=0' | grep -q 'changed=0.*failed=0'
&& (echo 'Idempotence test: pass' && exit 0) && (echo 'Idempotence test: pass' && exit 0)
|| (echo 'Idempotence test: fail' && exit 1) || (echo 'Idempotence test: fail' && exit 1)
# Delete all containers # Delete all containers
- docker kill mongo{1,2,3} && docker rm mongo{1,2,3} - sudo docker kill mongo{1,2,3} && docker rm mongo{1,2,3}