sudo: required

language: python

services:
  - docker

install:
  # Use Docker Engine 1.9.x for build cache support. See: https://github.com/docker/docker/issues/20380#issuecomment-212388961
  - sudo apt-get -o Dpkg::Options::="--force-confnew" -q -y --force-yes install docker-engine=1.9.1-0~trusty

before_script:
  - docker --version
  - docker-compose --version
  - docker-compose -f docker-compose.travis.yml config
  - docker login -e="$DOCKER_EMAIL" -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
  - docker pull "interaction/project_template:$TAG" || true
  - docker build --pull -t "interaction/project_template:$TAG" .

script:
  - docker-compose -f docker-compose.travis.yml run --rm django

after_success:
  - docker tag "interaction/icekit:$TAG" "interaction/icekit:$TRAVIS_COMMIT"
  - docker push "interaction/project_template:$TAG"
  - docker push "interaction/project_template:$TRAVIS_COMMIT"

env:
  global:
    # Use `pull-N`, Git tag, or Git branch as Docker image tag.
    - TAG=$([[ "$TRAVIS_PULL_REQUEST" != "false" ]] && echo "pull-$TRAVIS_PULL_REQUEST" || echo ${TRAVIS_TAG:-$TRAVIS_BRANCH} | sed 's/[^.0-9A-Za-z]/-/g')

sudo: required

language: python

services:
  - docker

install:
  # Use Docker Engine 1.9.x for build cache support. See: https://github.com/docker/docker/issues/20380#issuecomment-212388961
  - sudo apt-get -o Dpkg::Options::="--force-confnew" -q -y --force-yes install docker-engine=1.9.1-0~trusty

before_script:
  - docker --version
  - docker-compose --version
  - docker-compose -f docker-compose.travis.yml config
  - docker login -e="$DOCKER_EMAIL" -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
  - docker pull "interaction/project_template:$TAG" || true
  - docker build --pull -t "interaction/project_template:$TAG" .

script:
  - docker-compose -f docker-compose.travis.yml run --rm django

after_success:
  - docker tag "interaction/project_template:$TAG" "interaction/project_template:$TRAVIS_COMMIT"
  - docker push "interaction/project_template:$TAG"
  - docker push "interaction/project_template:$TRAVIS_COMMIT"

env:
  global:
    # Use `pull-N`, Git tag, or Git branch as Docker image tag.
    - TAG=$([[ "$TRAVIS_PULL_REQUEST" != "false" ]] && echo "pull-$TRAVIS_PULL_REQUEST" || echo ${TRAVIS_TAG:-$TRAVIS_BRANCH} | sed 's/[^.0-9A-Za-z]/-/g')

Use `project_template` as image name instead of `icekit`.
Use `project_template` as image name instead of `icekit`.
