language: generic

sudo: required

env:
  globaL:
    - DOCKER_VERSION=1.11.2-0~trusty
    - DOCKER_COMPOSE_VERSION=1.7.1
    - COMPOSE_HTTP_TIMEOUT=3600

#env:
#  - test: Ubuntu 14.04 Apache
#    distribution: ubuntu
#    version: 14.04
#    init: /sbin/init
#    run_opts: ""

addons:
  hosts:
    - aegir.travis
    - sitetest.aegir.travis

services:
  - docker

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}

  # reinstall docker-compose at specific version
  - sudo rm /usr/local/bin/docker-compose
  - curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
  - chmod +x docker-compose
  - sudo mv docker-compose /usr/local/bin
  - docker --version
  - docker-compose --version

  - sudo mkdir vendor
  - sudo chmod 777 vendor

  - sudo mkdir bin
  - sudo chmod 777 bin

script:
  # The test run is included in the docker-entrypoint-tests.sh file.
  - sudo docker-compose up --abort-on-container-exit

language: generic

sudo: required

env:
  globaL:
    - DOCKER_VERSION=1.11.2-0~trusty
    - DOCKER_COMPOSE_VERSION=1.7.1
    - COMPOSE_HTTP_TIMEOUT=3600

#env:
#  - test: Ubuntu 14.04 Apache
#    distribution: ubuntu
#    version: 14.04
#    init: /sbin/init
#    run_opts: ""

addons:
  hosts:
    - aegir.travis
    - sitetest.aegir.travis

services:
  - docker

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}

  # reinstall docker-compose at specific version
  - sudo rm /usr/local/bin/docker-compose
  - curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
  - chmod +x docker-compose
  - sudo mv docker-compose /usr/local/bin
  - docker --version
  - docker-compose --version

  - sudo mkdir vendor
  - sudo chmod 777 vendor

  - sudo mkdir bin
  - sudo chmod 777 bin

script:
  # The test run is included in the docker-entrypoint-tests.sh file.
  - sudo -E docker-compose up --abort-on-container-exit

Use -E to keep environment variables.
Use -E to keep environment variables.
