diff --git a/action/pipeline/validate.go b/action/pipeline/validate.go index 641fdc65..81729aa1 100644 --- a/action/pipeline/validate.go +++ b/action/pipeline/validate.go @@ -107,7 +107,7 @@ func (c *Config) ValidateLocal(client compiler.Engine) error { logrus.Tracef("compiling pipeline %s", path) // compile the object into a pipeline - p, _, err := client.CompileLite(path, c.Template, false) + p, _, err := client.CompileLite(path, c.Template, false, c.TemplateFiles) if err != nil { return err } diff --git a/action/pipeline/validate_test.go b/action/pipeline/validate_test.go index 74c4c1f1..2be7011c 100644 --- a/action/pipeline/validate_test.go +++ b/action/pipeline/validate_test.go @@ -284,7 +284,7 @@ func TestPipeline_Config_ValidateLocal(t *testing.T) { for _, test := range tests { isLocal := len(test.config.TemplateFiles) > 0 - err := test.config.ValidateLocal(client.WithLocal(isLocal).WithLocalTemplates(test.config.TemplateFiles)) + err := test.config.ValidateLocal(client.WithLocal(isLocal)) if test.failure { if err == nil { diff --git a/command/pipeline/validate.go b/command/pipeline/validate.go index 40a16468..652a7133 100644 --- a/command/pipeline/validate.go +++ b/command/pipeline/validate.go @@ -196,7 +196,6 @@ func validate(c *cli.Context) error { // set when user is sourcing templates from local machine if len(p.TemplateFiles) != 0 { client.WithLocal(true) - client.WithLocalTemplates(p.TemplateFiles) client.TemplateDepth = c.Int("max-template-depth") } else { // set max template depth to minimum of 5 and provided value if local templates are not provided. diff --git a/go.mod b/go.mod index 6c39a111..dba5c160 100644 --- a/go.mod +++ b/go.mod @@ -10,10 +10,10 @@ require ( github.com/dustin/go-humanize v1.0.1 github.com/gin-gonic/gin v1.9.1 github.com/go-git/go-git/v5 v5.8.1 - github.com/go-vela/sdk-go v0.20.1 - github.com/go-vela/server v0.20.1 - github.com/go-vela/types v0.20.1 - github.com/go-vela/worker v0.20.1 + github.com/go-vela/sdk-go v0.20.2 + github.com/go-vela/server v0.20.2 + github.com/go-vela/types v0.20.2 + github.com/go-vela/worker v0.20.2 github.com/golang-jwt/jwt/v5 v5.0.0 github.com/gosuri/uitable v0.0.4 github.com/manifoldco/promptui v0.9.0 diff --git a/go.sum b/go.sum index d861984b..3228878e 100644 --- a/go.sum +++ b/go.sum @@ -158,14 +158,14 @@ github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91 github.com/go-playground/validator/v10 v10.14.0 h1:vgvQWe3XCz3gIeFDm/HnTIbj6UGmg/+t63MyGU2n5js= github.com/go-playground/validator/v10 v10.14.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 h1:p104kn46Q8WdvHunIJ9dAyjPVtrBPhSr3KT2yUst43I= -github.com/go-vela/sdk-go v0.20.1 h1:c0i4kzeHtvdZHJwCEIK9SsUUc6oSyynYv66IXw6MRCc= -github.com/go-vela/sdk-go v0.20.1/go.mod h1:LnWNiqcFVv9GARBFLLvgoYycfbi5PI187NrL1FLn8v0= -github.com/go-vela/server v0.20.1 h1:TsAhCj3wqm4kxfq9M6J8+3MmBKlDeJoTr4UGknT9yQw= -github.com/go-vela/server v0.20.1/go.mod h1:M4rSAg8arMhIQYXQpc/ZmMbNW73ur8yE88klMk0Dq9w= -github.com/go-vela/types v0.20.1 h1:hHAX0Iij2J7UZ9f3SlXbwNy481CjKzU9CBfkiLuysVE= -github.com/go-vela/types v0.20.1/go.mod h1:AXO4oQSygOBQ02fPapsKjQHkx2aQO3zTu7clpvVbXBY= -github.com/go-vela/worker v0.20.1 h1:3RetSe4+Z3CL4afogomkNdT88EppKh2UOf8UXJ0WPhc= -github.com/go-vela/worker v0.20.1/go.mod h1:qkJs4581m+K2d7xGQm9P/75cJ3aypZmgQURFG8sZNr0= +github.com/go-vela/sdk-go v0.20.2 h1:NW5m7Efu4bO6a3R1pZH972OfuCTXuyEQCMs4h/ClS/8= +github.com/go-vela/sdk-go v0.20.2/go.mod h1:JmJeroTgIQR0hR5liRESYmwtK6FyfvimoNwNGFfI8M0= +github.com/go-vela/server v0.20.2 h1:PkPkZq98hsqbEUkkYRnyX5V80rAR7Qh5nHKlgH7jE4s= +github.com/go-vela/server v0.20.2/go.mod h1:GvJ3E3AGbMGxJGaDXev853Te6G0msNqhYdm6bEnne8E= +github.com/go-vela/types v0.20.2 h1:PnyKJareZTEvVoAOe48tRnOMETVtpm+5JdHqOsMA0v0= +github.com/go-vela/types v0.20.2/go.mod h1:AXO4oQSygOBQ02fPapsKjQHkx2aQO3zTu7clpvVbXBY= +github.com/go-vela/worker v0.20.2 h1:tLdPWkdZlCiDSKVcG95xGabqWD0/tDn7oeJJMIJEgFQ= +github.com/go-vela/worker v0.20.2/go.mod h1:D7rx1LrQSLLL+Fn/OBdk8n4Pf/A5dDfcUgD0cAv2GZY= github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=