TravisCI build improvements

This commit is contained in:
Sergei Antipov 2016-04-17 20:56:00 +06:00
parent 630e773962
commit 201c4089e2
1 changed files with 14 additions and 5 deletions

View File

@ -4,8 +4,17 @@
sudo: required
env:
- >
distribution=ubuntu-upstart
version=14.04
DISTRIBUTION=ubuntu-upstart
DIST_VERSION=14.04
MONGODB_VERSION=3.2
- >
DISTRIBUTION=ubuntu-upstart
DIST_VERSION=14.04
MONGODB_VERSION=3.0
- >
DISTRIBUTION=ubuntu-upstart
DIST_VERSION=14.04
MONGODB_VERSION=2.6
# - >
# distribution=ubuntu-upstart
# version=12.04
@ -24,14 +33,14 @@ before_install:
- sudo apt-get install ansible python-pip -y
- sudo pip install docker-py==1.5.0
# Pull docker image
- sudo docker pull ${distribution}:${version}
- sudo docker pull ${DISTRIBUTION}:${DIST_VERSION}
- sudo ln -s ${PWD} /etc/ansible/roles/greendayonfire.mongodb
script:
- sudo ansible-playbook -i tests/hosts tests/site.yml -e target=mongo1
- sudo ansible-playbook -i tests/hosts tests/site.yml -e target=mongo1 -e mongodb_version=${MONGODB_VERSION}
# Idempotence test
- >
sudo ansible-playbook -i tests/hosts tests/site.yml -e target=mongo1
sudo ansible-playbook -i tests/hosts tests/site.yml -e target=mongo1 -e mongodb_version=${MONGODB_VERSION}
| grep -q 'changed=0.*failed=0'
&& (echo 'Idempotence test: pass' && exit 0)
|| (echo 'Idempotence test: fail' && exit 1)