mirror of
https://github.com/thegeeklab/wp-docker-buildx.git
synced 2024-11-22 10: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:
commit
82104c20c8
2
Makefile
2
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)"
|
||||
|
12
plugin.go
12
plugin.go
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user