diff --git a/.travis.yml b/.travis.yml index ad871a2..9751c12 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,11 +1,43 @@ +sudo: 'required' + language: go -go: - - 1.10.x +services: + - 'docker' + +env: + global: + - ORGANIZATION=$DOCKER_USERNAME + +matrix: + include: + - go: "1.11.x" + env: VERSION=0.4.1 +fast_finish: true before_install: # We need golang/dep installed to resolve our dependencies - curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh - dep ensure -script: make build test +script: + - 'make build test' + - 'make docker-image' + +after_success: + docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD; + make docker-push; + # - if [[ "$TRAVIS_BRANCH" == "master" ]]; then + # docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD; + # make docker-push; + # else + # echo "Build succeeded in non-master branch" + # fi + +# Uncomment if only commits to master require builds +# branches: +# except: +# - master + +notifications: + email: false diff --git a/Makefile b/Makefile index 0708d02..71a0d34 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,8 @@ -VERSION=$(shell git describe --always | sed 's|v\(.*\)|\1|') -BRANCH=$(shell git rev-parse --abbrev-ref HEAD) -OS:=$(shell uname -s | awk '{ print tolower($$1) }') -ARCH=amd64 -ORGANIZATION=timescale +VERSION?=$(shell git describe --always | sed 's|v\(.*\)|\1|') +BRANCH?=$(shell git rev-parse --abbrev-ref HEAD) +OS?=$(shell uname -s | awk '{ print tolower($$1) }') +ARCH?=amd64 +ORGANIZATION?=timescale ifeq ($(shell uname -m), i386) ARCH=386