language: python
matrix:
  include:
    - os: linux
      dist: trusty
      sudo: required
      python: '3.6'
install:
    - sudo apt-get update && sudo apt-get install git ebtables qemu-kvm bridge-utils bison flex libdb-dev
    - pushd /tmp/
    - git clone https://kernel.googlesource.com/pub/scm/linux/kernel/git/shemminger/iproute2
    - cd iproute2
    - git checkout v4.2.0
    - make
    - sudo make install
    - popd
    - sudo bash -c "source /home/travis/virtualenv/python3.6/bin/activate && pip install -r requirements.txt"
script:
    - pushd ~/build/miniworld-project/miniworld_core
    - uname -a
    - pwd
    - sudo bash -c "source /home/travis/virtualenv/python3.6/bin/activate && PYTHONPATH=$PWD ENV=CI pytest tests"
after_success:
 - export TAG=`if [ "$TRAVIS_BRANCH" == "master" ]; then echo "latest"; else echo $TRAVIS_BRANCH ; fi`
 - export REPO=miniworldproject/miniworld_core
 - docker build -t $REPO:$TAG -f ci/Dockerfile .
 - docker login -u $DOCKER_USER -p $DOCKER_PASS
 - docker tag $REPO:$COMMIT $REPO:$TAG
 - docker tag $REPO:$COMMIT $REPO:$TRAVIS_BUILD_NUMBER
 - docker push $REPO

language: python
matrix:
  include:
    - os: linux
      dist: trusty
      sudo: required
      python: '3.6'
install:
    - sudo apt-get update && sudo apt-get install git ebtables qemu-kvm bridge-utils bison flex libdb-dev
    - pushd /tmp/
    - git clone https://kernel.googlesource.com/pub/scm/linux/kernel/git/shemminger/iproute2
    - cd iproute2
    - git checkout v4.2.0
    - make
    - sudo make install
    - popd
    - sudo bash -c "source /home/travis/virtualenv/python3.6/bin/activate && pip install -r requirements.txt"
script:
    - pushd ~/build/miniworld-project/miniworld_core
    - uname -a
    - pwd
    - sudo bash -c "source /home/travis/virtualenv/python3.6/bin/activate && PYTHONPATH=$PWD ENV=CI pytest tests"
after_success:
 - export TAG=`if [ "$TRAVIS_BRANCH" == "master" ]; then echo "latest"; else echo $TRAVIS_BRANCH ; fi`
 - export REPO=miniworldproject/miniworld_core
 - docker build -t $REPO:$TAG -f ci/Dockerfile .
 - docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
 - docker tag $REPO:$COMMIT $REPO:$TAG
 - docker tag $REPO:$COMMIT $REPO:$TRAVIS_BUILD_NUMBER
 - docker push $REPO

Fix docker login env names
Fix docker login env names
