mirror of
https://github.com/bloomberg/goldpinger.git
synced 2026-08-23 21:36:25 +00:00
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:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user