0
0
mirror of https://github.com/thegeeklab/wp-docker-buildx.git synced 2024-11-25 09:10:39 +00:00

Merge pull request #61 from vespakoen/more-logging

More logging, disable docker login email, changes to makefile
This commit is contained in:
Brad Rydzewski 2016-06-18 14:47:08 -07:00 committed by GitHub
commit 82104c20c8
2 changed files with 13 additions and 1 deletions

View File

@ -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)"

View File

@ -123,6 +123,18 @@ const dockerExe = "/usr/local/bin/docker"
// helper function to create the docker login command.
func commandLogin(login Login) *exec.Cmd {
if login.Email != "" {
return commandLoginEmail(login)
}
return exec.Command(
dockerExe, "login",
"-u", login.Username,
"-p", login.Password,
login.Registry,
)
}
func commandLoginEmail(login Login) *exec.Cmd {
return exec.Command(
dockerExe, "login",
"-u", login.Username,