sudo: required

services:
  - docker

env:
  - MONGO_VERSION=3.0
  - MONGO_VERSION=3.2
  - MONGO_VERSION=3.4

before_install:
  - docker run -d --name mongo -d mongo:$MONGO_VERSION

script:
  - cd $MONGO_VERSION && docker build -t istepanov/mongodump:$MONGO_VERSION .
  - docker run -t --link mongo:mongo istepanov/mongodump:$MONGO_VERSION no-cron

sudo: required

services:
  - docker

env:
  - MONGO_VERSION=3.0
  - MONGO_VERSION=3.2
  - MONGO_VERSION=3.4

before_install:
  - docker run -d --name mongo -d mongo:$MONGO_VERSION

script:
  - cd $MONGO_VERSION && docker build -t istepanov/mongodump:$MONGO_VERSION .
  - docker run -t --link mongo:mongo -v $(pwd)/backup:/backup istepanov/mongodump:$MONGO_VERSION no-cron
  - '[ "$(ls -A backup)" ] || travis_terminate 1'

Test if backup file was actually created.
Test if backup file was actually created.
