services:
  - docker

language: go
go:
  - 1.7.x

branches:
  only: 
    - master
    - /^bzub-.*$/
    - /^v\d+\.\d+(\.\d+)?(-\S*)?$/

env:
  global:
    - REPO=cloudnativelabs/kube-router
    - REPO_PATH=$HOME/gopath/src/github.com/$REPO
    - GIT_BRANCH=$TRAVIS_BRANCH
    - IMG_FQDN=quay.io

script:
  # All successfully built commits get an image placed in the kube-router-git
  # image repo and tagged with the commit hash.
  - build/travis-deploy.sh

# This fixes issues when a contributor uses their own Travis CI account to test
# code/CI changes.
before_install:
  - mkdir -p $REPO_PATH
  - rsync -az ${TRAVIS_BUILD_DIR}/ $REPO_PATH
  - export TRAVIS_BUILD_DIR=$REPO_PATH
  - cd $REPO_PATH

services:
  - docker

language: go
go:
  - 1.7.x

branches:
  only: 
    - master
    - /^bzub-.*$/
    - /^v\d+\.\d+(\.\d+)?(-\S*)?$/

env:
  global:
    - REPO=cloudnativelabs/kube-router
    - REPO_PATH=$HOME/gopath/src/github.com/$REPO
    - GIT_BRANCH=$TRAVIS_BRANCH

script:
  # All successfully built commits get an image placed in the kube-router-git
  # image repo and tagged with the commit hash.
  - build/travis-deploy.sh

# This fixes issues when a contributor uses their own Travis CI account to test
# code/CI changes.
before_install:
  - mkdir -p $REPO_PATH
  - rsync -az ${TRAVIS_BUILD_DIR}/ $REPO_PATH
  - export TRAVIS_BUILD_DIR=$REPO_PATH
  - cd $REPO_PATH

Use DockerHub for release and dev images
push: Use DockerHub for release and dev images
