language: go
sudo: required
dist: trusty

install:
  - sudo apt-get update -y
  - sudo apt-get install -y curl bison make


############### Dockerised

before_script:
  - mount > build_debug.log
  - echo $TRAVIS_BUILD_DIR >> build_debug.log
  - docker login -e="$DOCKER_EMAIL" -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
  - docker pull bbiskup/edify_web_dev:latest || true
  - docker-compose build --no-cache
  - docker-compose up -d

script:
  - ./docker-cmd.sh ./scripts/run-checks.sh
  - sleep 5 # Allow for initialization

after_success:
  # docker-compose strips underscores and dashes from directory name,
  # hence edify-web / service "dev" --> image edifyweb_dev
  - docker tag -f edifyweb_dev bbiskup/edifyweb_dev:latest
  - docker tag edifyweb_dev bbiskup/edifyweb_dev:$TRAVIS_BUILD_NUMBER
  - docker push bbiskup/edifyweb_dev:latest
  - docker push bbiskup/edifyweb_dev:$TRAVIS_BUILD_NUMBER

language: go
sudo: required
dist: trusty

install:
  - sudo apt-get update -y
  - sudo apt-get install -y curl bison make


############### Dockerised

before_script:
  - mount > build_debug.log
  - echo $TRAVIS_BUILD_DIR >> build_debug.log
  - docker login -e="$DOCKER_EMAIL" -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
  - docker pull bbiskup/edify_web_dev:latest || true
  - make

script:
  - ./docker-cmd.sh ./scripts/run-checks.sh
  - sleep 5 # Allow for initialization

after_success:
  # docker-compose strips underscores and dashes from directory name,
  # hence edify-web / service "dev" --> image edifyweb_dev
  - docker tag -f edifyweb_dev bbiskup/edifyweb_dev:latest
  - docker tag edifyweb_dev bbiskup/edifyweb_dev:$TRAVIS_BUILD_NUMBER
  - docker push bbiskup/edifyweb_dev:latest
  - docker push bbiskup/edifyweb_dev:$TRAVIS_BUILD_NUMBER

Use make command to build/run container
Use make command to build/run container
