Enable push of images to DockerHub

This patch will enable pushes of any successful builds (using Travis-CI)
of the 'master' branch to the proper repository on DockerHub. The credentials
necessary are provided via environment variables configured in the
Travis-CI settings.

Addresses issue #27

Signed-off-by: Kevin P. Fleming <kpfleming@bloomberg.net>
This commit is contained in:
Kevin P. Fleming
2019-03-11 15:29:58 -04:00
parent 3f70a24804
commit 84a43a3d28
2 changed files with 7 additions and 2 deletions
+5
View File
@@ -24,3 +24,8 @@ script:
- make clean && make build-multistage
- docker images
- docker run `make version` --help
after_success:
- if [[ "$TRAVIS_BRANCH" == "master" ]]; then
docker login -u "$DOCKER_USER" -p "$DOCKER_PASSWORD" && make tag && make push;
fi
+2 -2
View File
@@ -4,7 +4,7 @@ bin ?= goldpinger
pkg ?= "github.com/bloomberg/goldpinger"
tag = $(name):$(version)
goos ?= ${GOOS}
namespace ?= ""
namespace ?= "bloomberg/"
files = $(shell find . -iname "*.go")
@@ -38,7 +38,7 @@ push:
run:
go run ./cmd/goldpinger/main.go
version:
@echo $(tag)