diff --git a/action/pipeline/validate.go b/action/pipeline/validate.go index 81729aa1..641fdc65 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, c.TemplateFiles) + p, _, err := client.CompileLite(path, c.Template, false) if err != nil { return err } diff --git a/action/pipeline/validate_test.go b/action/pipeline/validate_test.go index 2be7011c..74c4c1f1 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)) + err := test.config.ValidateLocal(client.WithLocal(isLocal).WithLocalTemplates(test.config.TemplateFiles)) if test.failure { if err == nil { diff --git a/command/pipeline/validate.go b/command/pipeline/validate.go index 652a7133..40a16468 100644 --- a/command/pipeline/validate.go +++ b/command/pipeline/validate.go @@ -196,6 +196,7 @@ 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 dba5c160..693b8a2d 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.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/go-vela/sdk-go v0.20.3 + github.com/go-vela/server v0.20.3 + github.com/go-vela/types v0.20.3 + github.com/go-vela/worker v0.20.3 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 3228878e..94da625e 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.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/go-vela/sdk-go v0.20.3 h1:/PSTIT6BsYglr56ldmdQJgM/QYZ0EZG7PDLyAEw1bYc= +github.com/go-vela/sdk-go v0.20.3/go.mod h1:1cdzmLOXEsSfQp8dDhD6FXsFpxwBIyPGUI/wrEB4E/I= +github.com/go-vela/server v0.20.3 h1:RPpPpEBMIclimfZgOhUCmZkrJ59g5hYNB3ctFR5N6fs= +github.com/go-vela/server v0.20.3/go.mod h1:lWZ2MNrBrW37OaQXsnqfp/vGvKzjk21QGodHfaQZmYQ= +github.com/go-vela/types v0.20.3 h1:vrX9pFTzTHbtfjHdbAwp9Ii3hWx3OSZ8qTINyaq2j2k= +github.com/go-vela/types v0.20.3/go.mod h1:AXO4oQSygOBQ02fPapsKjQHkx2aQO3zTu7clpvVbXBY= +github.com/go-vela/worker v0.20.3 h1:OcXPbb9oJ0SZ0uEDFK3k9jC0QIiY3PXB9CdI3rgSHzE= +github.com/go-vela/worker v0.20.3/go.mod h1:gwhkLFTTyQEnjRdvEcJsxaYhJvVkMlVwXuAsh4bBWig= 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=