git:
  depth: 1

env:
  DOCKER_COMPOSE_VERSION: 1.13.0

cache:
  directories:
    - vendor
    - $HOME/.composer/cache

sudo: required
dist: trusty

services:
  - docker

before_install:
  - 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
  - sudo apt-get update
  - sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-engine
  - export BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo $TRAVIS_PULL_REQUEST_BRANCH; fi)
  - echo "TRAVIS_BRANCH=$TRAVIS_BRANCH, PR=$PR, BRANCH=$BRANCH, COMMIT=$COMMIT"

install:
  - docker-compose build

script:
  - docker-compose run web azuracast_testing $CODECLIMATE_REPO_TOKEN

after_failure:
  - docker-compose run web cat /var/azuracast/www/tests/_output/*

after_success:
  - docker login -e '$DOCKER_EMAIL' -u '$DOCKER_USER' -p '$DOCKER_PASS'
  - if [ "$BRANCH" == "master" ]; then docker-compose push; fi
git:
  depth: 1

env:
  DOCKER_COMPOSE_VERSION: 1.13.0

cache:
  directories:
    - vendor
    - $HOME/.composer/cache

sudo: required
dist: trusty

services:
  - docker

before_install:
  - 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
  - sudo apt-get update
  - sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-engine
  - export BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo $TRAVIS_PULL_REQUEST_BRANCH; fi)
  - echo "TRAVIS_BRANCH=$TRAVIS_BRANCH, PR=$PR, BRANCH=$BRANCH, COMMIT=$COMMIT"

install:
  - docker-compose build

script:
  - docker-compose run web azuracast_testing $CODECLIMATE_REPO_TOKEN

after_failure:
  - docker-compose run web cat /var/azuracast/www/tests/_output/*

after_success:
  - docker login --username $DOCKER_USER --password $DOCKER_PASS
  - if [ "$BRANCH" == "master" ]; then docker-compose push; fi
Switch syntax for docker login.
Switch syntax for docker login.
