sudo: required
services:
  - docker

env:
    global:
        - DOCKER_VERSION=1.12.1-0~trusty

before_install:
  # list docker-engine versions
  - apt-cache madison docker-engine
  # upgrade docker-engine to specific version
  - sudo apt-get -o Dpkg::Options::="--force-confnew" install -y docker-engine=${DOCKER_VERSION}
  - docker version
  - docker info
  - sudo add-apt-repository ppa:duggan/bats --yes
  - sudo apt-get update -qq
  - sudo apt-get install -qq bats
  - make update-dependencies

script:
  - make test

sudo: required
services:
  - docker

env:
    global:
        - DOCKER_VERSION=1.12.3-0~trusty

before_install:
  # list docker-engine versions
  - apt-cache madison docker-engine
  # upgrade docker-engine to specific version
  - sudo apt-get -o Dpkg::Options::="--force-confnew" install -y --allow-downgrades docker-engine=${DOCKER_VERSION}
  - docker version
  - docker info
  - sudo add-apt-repository ppa:duggan/bats --yes
  - sudo apt-get update -qq
  - sudo apt-get install -qq bats
  - make update-dependencies

script:
  - make test

Upgrade docker-engine and allow downgrades
Upgrade docker-engine and allow downgrades
