From 9f937e24251b555a0d2b75a3bcce34e2f54cd66b Mon Sep 17 00:00:00 2001 From: Brad Rydzewski Date: Tue, 27 Sep 2016 20:40:59 -0500 Subject: [PATCH] removed default image namespacing --- agent/agent.go | 2 -- yaml/transform/clone.go | 2 +- yaml/transform/image.go | 22 ---------------------- 3 files changed, 1 insertion(+), 25 deletions(-) diff --git a/agent/agent.go b/agent/agent.go index 651a616ad..74e364c17 100644 --- a/agent/agent.go +++ b/agent/agent.go @@ -154,8 +154,6 @@ func (a *Agent) prep(w *model.Work) (*yaml.Config, error) { transform.CommandTransform(conf) transform.ImagePull(conf, a.Pull) transform.ImageTag(conf) - transform.ImageName(conf) - transform.ImageNamespace(conf, a.Namespace) if err := transform.ImageEscalate(conf, a.Escalate); err != nil { return nil, err } diff --git a/yaml/transform/clone.go b/yaml/transform/clone.go index f47abf41f..a54406714 100644 --- a/yaml/transform/clone.go +++ b/yaml/transform/clone.go @@ -7,7 +7,7 @@ const clone = "clone" // Clone transforms the Yaml to include a clone step. func Clone(c *yaml.Config, plugin string) error { if plugin == "" { - plugin = "git" + plugin = "plugins/git" } for _, p := range c.Pipeline { diff --git a/yaml/transform/image.go b/yaml/transform/image.go index a13a983cc..69aee9746 100644 --- a/yaml/transform/image.go +++ b/yaml/transform/image.go @@ -34,28 +34,6 @@ func ImageTag(conf *yaml.Config) error { return nil } -// ImageName transforms the Yaml to replace underscores with dashes. -func ImageName(conf *yaml.Config) error { - for _, image := range conf.Pipeline { - image.Image = strings.Replace(image.Image, "_", "-", -1) - } - return nil -} - -// ImageNamespace transforms the Yaml to use a default namepsace for plugins. -func ImageNamespace(conf *yaml.Config, namespace string) error { - for _, image := range conf.Pipeline { - if strings.Contains(image.Image, "/") { - continue - } - if !isPlugin(image) { - continue - } - image.Image = filepath.Join(namespace, image.Image) - } - return nil -} - // ImageEscalate transforms the Yaml to automatically enable privileged mode // for a subset of white-listed plugins matching the given patterns. func ImageEscalate(conf *yaml.Config, patterns []string) error {