From 29dccc3dc37c70cd095075724c336a519dbd6bb2 Mon Sep 17 00:00:00 2001 From: Koen Schmeets Date: Sat, 18 Jun 2016 22:23:15 +0200 Subject: [PATCH] More logging, disable docker login email, changes to makefile --- Makefile | 3 ++- plugin.go | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 3881d6f..a4526f7 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ .PHONY: all clean deps fmt vet test docker EXECUTABLE ?= drone-docker -IMAGE ?= plugins/$(EXECUTABLE) +IMAGE ?= plugins/docker COMMIT ?= $(shell git rev-parse --short HEAD) LDFLAGS = -X "main.buildCommit=$(COMMIT)" @@ -13,6 +13,7 @@ clean: go clean -i ./... deps: + go get -u github.com/codegangsta/cli/... go get -t ./... fmt: diff --git a/plugin.go b/plugin.go index ac94535..76704bf 100644 --- a/plugin.go +++ b/plugin.go @@ -95,11 +95,11 @@ func (p Plugin) Exec() error { cmds = append(cmds, commandVersion()) // docker version cmds = append(cmds, commandInfo()) // docker info cmds = append(cmds, commandBuild(p.Build)) // docker build - for _, tag := range p.Build.Tags { + fmt.Fprintf(os.Stdout, "Tagging: %s\n", tag) cmds = append(cmds, commandTag(p.Build, tag)) // docker tag - if p.Dryrun == false { + fmt.Fprintf(os.Stdout, "Pushing: %s\n", tag) cmds = append(cmds, commandPush(p.Build, tag)) // docker push } } @@ -123,11 +123,12 @@ const dockerExe = "/usr/local/bin/docker" // helper function to create the docker login command. func commandLogin(login Login) *exec.Cmd { + fmt.Fprintf(os.Stdout, "Logging in to registry: %s with user: %s and email: %s\n", login.Registry, login.Username, login.Email) return exec.Command( dockerExe, "login", "-u", login.Username, "-p", login.Password, - "-e", login.Email, + // "-e", login.Email, login.Registry, ) }