sudo: required

services:
      - docker
addons:
  apt:
    packages:
      - docker-ce

before_install:

script:
    - sh build.sh
    # Invoke ci script too
    - sh contrib/ci.sh
after_success:
    - if [ ! -s "$TRAVIS_TAG" ] ; then 
        docker tag $DOCKER_USERNAME/gateway:latest-dev $DOCKER_USERNAME/gateway:$TRAVIS_TAG;
        docker login -u=$DOCKER_USERNAME -p=$DOCKER_PASSWORD;
        docker push $DOCKER_USERNAME/gateway:$TRAVIS_TAG;
        fi
sudo: required

services:
      - docker
addons:
  apt:
    packages:
      - docker-ce

before_install:

script:
    - sh build.sh
    # Invoke ci script too
    - sh contrib/ci.sh
after_success:
    - if [ ! -s "$TRAVIS_TAG" ] ; then 
        docker tag $DOCKER_NS/gateway:latest-dev $DOCKER_NS/gateway:$TRAVIS_TAG;
        docker login -u=$DOCKER_USERNAME -p=$DOCKER_PASSWORD;
        docker push $DOCKER_NS/gateway:$TRAVIS_TAG;
        fi

Correct to DOCKER_NS for Travis auto-push
Correct to DOCKER_NS for Travis auto-push