diff --git a/yaml/transform/image.go b/yaml/transform/image.go index 69aee9746..514f0d6c8 100644 --- a/yaml/transform/image.go +++ b/yaml/transform/image.go @@ -40,6 +40,15 @@ func ImageEscalate(conf *yaml.Config, patterns []string) error { for _, c := range conf.Pipeline { for _, pattern := range patterns { if ok, _ := filepath.Match(pattern, c.Image); ok { + if c.Detached { + return fmt.Errorf("Detached mode disabled for the %s plugin", c.Image) + } + if len(c.Entrypoint) != 0 { + return fmt.Errorf("Custom entrypoint disabled for the %s plugin", c.Image) + } + if len(c.Command) != 0 { + return fmt.Errorf("Custom command disabled for the %s plugin", c.Image) + } if len(c.Commands) != 0 { return fmt.Errorf("Custom commands disabled for the %s plugin", c.Image) } diff --git a/yaml/transform/validate.go b/yaml/transform/validate.go index 161280dc3..efcd1710a 100644 --- a/yaml/transform/validate.go +++ b/yaml/transform/validate.go @@ -36,6 +36,9 @@ func Check(c *yaml.Config, trusted bool) error { // validate the plugin command and entrypoint and return an error // the user attempts to set or override these values. func CheckEntrypoint(c *yaml.Container) error { + if c.Detached { + return nil + } if len(c.Entrypoint) != 0 { return fmt.Errorf("Cannot set plugin Entrypoint") }