diff --git a/compiler/native/compile.go b/compiler/native/compile.go index b0648ded0..206124519 100644 --- a/compiler/native/compile.go +++ b/compiler/native/compile.go @@ -50,12 +50,6 @@ func (c *client) Compile(v interface{}) (*pipeline.Build, *library.Pipeline, err _pipeline.SetData(data) _pipeline.SetType(c.repo.GetPipelineType()) - // validate the yaml configuration - err = c.Validate(p) - if err != nil { - return nil, _pipeline, err - } - // create map of templates for easy lookup templates := mapFromTemplates(p.Templates) diff --git a/compiler/native/validate.go b/compiler/native/validate.go index 1d5b0440b..e3c79d862 100644 --- a/compiler/native/validate.go +++ b/compiler/native/validate.go @@ -101,8 +101,8 @@ func validateStages(s yaml.StageSlice) error { return fmt.Errorf("no name provided for step for stage %s", stage.Name) } - if len(step.Image) == 0 && len(step.Template.Name) == 0 { - return fmt.Errorf("no image or template provided for step %s for stage %s", step.Name, stage.Name) + if len(step.Image) == 0 { + return fmt.Errorf("no image provided for step %s for stage %s", step.Name, stage.Name) } if step.Name == "clone" || step.Name == "init" { @@ -128,8 +128,8 @@ func validateSteps(s yaml.StepSlice) error { return fmt.Errorf("no name provided for step") } - if len(step.Image) == 0 && len(step.Template.Name) == 0 { - return fmt.Errorf("no image or template provided for step %s", step.Name) + if len(step.Image) == 0 { + return fmt.Errorf("no image provided for step %s", step.Name) } if step.Name == "clone" || step.Name == "init" {