language: php

php:
  - '7.0'

sudo: false

services:
  - docker

env:
  global:
  - MOZILLIANS_KEY=null
  - BUILT_CONTAINER_NAME="colinfrei/mozilachtest:$TRAVIS_BRANCH"

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

install:
  - composer install

script: phpunit -c app/

branches:
  only:
  - release
  - travis

after_success:
  - docker build -t="$BUILT_CONTAINER_NAME" .
  - docker login -e="$DOCKER_EMAIL" -u="colinfrei" -p="$DOCKER_PASSWORD"
  - docker push "$BUILT_CONTAINER_NAME"
#  - docker run -h mozilla.ch -p 80:80 -d -e "MOZILLAINS_KEY=$MOZILLIANS_KEY" $BUILT_CONTAINER_NAME

#notifications:
#  irc: "irc.mozilla.org#mozilla.ch"

language: php

php:
  - '7.0'

sudo: false

services:
  - docker

env:
  global:
  - MOZILLIANS_KEY=null
  - BUILT_CONTAINER_NAME="colinfrei/mozilachtest:$TRAVIS_BRANCH"

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

install:
  - composer install

script: phpunit -c app/

after_success:
  - docker build -t="$BUILT_CONTAINER_NAME" .
  - docker login -e="$DOCKER_EMAIL" -u="colinfrei" -p="$DOCKER_PASSWORD"
  - docker push "$BUILT_CONTAINER_NAME"
#  - docker run -h mozilla.ch -p 80:80 -d -e "MOZILLAINS_KEY=$MOZILLIANS_KEY" $BUILT_CONTAINER_NAME

#notifications:
#  irc: "irc.mozilla.org#mozilla.ch"

Revert "Only build on certain branches, so we don't build the container on pushed to master?"
Revert "Only build on certain branches, so we don't build the container on pushed to master?"

This reverts commit e0f749b67972a32d6ead6c4eed5afbbacc52a57b.
