Skip to content

Commit 201c408

Browse files
author
Sergei Antipov
committed
TravisCI build improvements
1 parent 630e773 commit 201c408

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

.travis.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,17 @@
44
sudo: required
55
env:
66
- >
7-
distribution=ubuntu-upstart
8-
version=14.04
7+
DISTRIBUTION=ubuntu-upstart
8+
DIST_VERSION=14.04
9+
MONGODB_VERSION=3.2
10+
- >
11+
DISTRIBUTION=ubuntu-upstart
12+
DIST_VERSION=14.04
13+
MONGODB_VERSION=3.0
14+
- >
15+
DISTRIBUTION=ubuntu-upstart
16+
DIST_VERSION=14.04
17+
MONGODB_VERSION=2.6
918
# - >
1019
# distribution=ubuntu-upstart
1120
# version=12.04
@@ -24,14 +33,14 @@ before_install:
2433
- sudo apt-get install ansible python-pip -y
2534
- sudo pip install docker-py==1.5.0
2635
# Pull docker image
27-
- sudo docker pull ${distribution}:${version}
36+
- sudo docker pull ${DISTRIBUTION}:${DIST_VERSION}
2837
- sudo ln -s ${PWD} /etc/ansible/roles/greendayonfire.mongodb
2938

3039
script:
31-
- sudo ansible-playbook -i tests/hosts tests/site.yml -e target=mongo1
40+
- sudo ansible-playbook -i tests/hosts tests/site.yml -e target=mongo1 -e mongodb_version=${MONGODB_VERSION}
3241
# Idempotence test
3342
- >
34-
sudo ansible-playbook -i tests/hosts tests/site.yml -e target=mongo1
43+
sudo ansible-playbook -i tests/hosts tests/site.yml -e target=mongo1 -e mongodb_version=${MONGODB_VERSION}
3544
| grep -q 'changed=0.*failed=0'
3645
&& (echo 'Idempotence test: pass' && exit 0)
3746
|| (echo 'Idempotence test: fail' && exit 1)

0 commit comments

Comments
 (0)