mirror of
https://github.com/drone-plugins/drone-docker.git
synced 2026-06-04 18:24:24 +08:00
remove docker registry string match
This commit is contained in:
@@ -5,7 +5,6 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"strings"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@@ -50,7 +49,7 @@ func (c *Config) SetCredHelper(registry, helper string) {
|
|||||||
|
|
||||||
func (c *Config) CreateDockerConfigJson(credentials []RegistryCredentials) ([]byte, error) {
|
func (c *Config) CreateDockerConfigJson(credentials []RegistryCredentials) ([]byte, error) {
|
||||||
for _, cred := range credentials {
|
for _, cred := range credentials {
|
||||||
if cred.Registry != "" && strings.Contains(cred.Registry, "docker") {
|
if cred.Registry != "" {
|
||||||
|
|
||||||
if cred.Username == "" {
|
if cred.Username == "" {
|
||||||
return nil, fmt.Errorf("Username must be specified for registry: %s", cred.Registry)
|
return nil, fmt.Errorf("Username must be specified for registry: %s", cred.Registry)
|
||||||
|
|||||||
Reference in New Issue
Block a user