Skip to content

Commit

Permalink
patch(pipeline): use LocalTemplates and adjust CompileLite call + upg…
Browse files Browse the repository at this point in the history
…rade modules to v0.20.3 (#478)
  • Loading branch information
ecrupper committed Sep 8, 2023
1 parent a706bd4 commit faf0992
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion action/pipeline/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion action/pipeline/validate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
1 change: 1 addition & 0 deletions command/pipeline/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 8 additions & 8 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down

0 comments on commit faf0992

Please sign in to comment.