removed default image namespacing

This commit is contained in:
Brad Rydzewski 2016-09-27 20:40:59 -05:00
parent 778971eb68
commit 9f937e2425
3 changed files with 1 additions and 25 deletions

View file

@ -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
}

View file

@ -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 {

View file

@ -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 {