Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
3ab841a
yeet
ecrupper Mar 22, 2023
a4eacdc
initial work
ecrupper Mar 22, 2023
5d61b68
remove unnecessary validation check
ecrupper Mar 22, 2023
b081082
adding some comments
ecrupper Mar 22, 2023
446a942
remove edits to inline testing
ecrupper Mar 22, 2023
73fb16e
Merge branch 'main' into feat/templateception
ecrupper Mar 23, 2023
2eba356
Merge branch 'main' into feat/templateception
ecrupper Mar 30, 2023
9b035c4
Merge branch 'main' into feat/templateception
ecrupper Apr 3, 2023
0b05339
Merge branch 'main' into feat/templateception
ecrupper Apr 5, 2023
132ff78
Merge branch 'main' into feat/templateception
cognifloyd Apr 10, 2023
67e635f
Merge branch 'main' into feat/templateception
ecrupper May 22, 2023
54da9db
fix typo
ecrupper May 22, 2023
7f90ed9
render inline init work
ecrupper May 22, 2023
6f73a4f
Merge branch 'main' into feat/templateception
ecrupper May 23, 2023
10938ac
support for render_inline
ecrupper May 23, 2023
6c68a78
Merge branch 'main' into feat/templateception
ecrupper May 23, 2023
f6f90fb
address feedback
ecrupper May 24, 2023
e40b5c7
Merge branch 'feat/templateception' of github.com:go-vela/server into…
ecrupper May 24, 2023
c5cd66a
validate template depth
ecrupper May 24, 2023
38a9fa4
added tests for compile inline
ecrupper May 25, 2023
7fea3ba
add test for error with called render_inline template in step
ecrupper May 25, 2023
cfc6c9b
drop vs code nonsense
ecrupper May 25, 2023
fb57519
add github.amrom.workers.devpiler flags to env example
ecrupper May 25, 2023
b712d33
Merge branch 'main' into feat/templateception
wass3rw3rk May 26, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
adding some comments
  • Loading branch information
ecrupper committed Mar 22, 2023
commit b0810828f18a91a58fe827dac94d8edb6547f282
2 changes: 2 additions & 0 deletions compiler/native/expand.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ func (c *client) ExpandSteps(s *yaml.Build, tmpls map[string]*yaml.Template, dep
return s, nil
}

// if max template depth has been reached, return to avoid circular dependencies
if depth == 0 {
retErr := fmt.Errorf("max template depth of %d exceeded", c.TemplateDepth)

Expand Down Expand Up @@ -106,6 +107,7 @@ func (c *client) ExpandSteps(s *yaml.Build, tmpls map[string]*yaml.Template, dep
return s, err
}

// if template references other templates, expand again
if len(tmplBuild.Templates) != 0 {
tmplBuild, err = c.ExpandSteps(tmplBuild, mapFromTemplates(tmplBuild.Templates), depth-1)
if err != nil {
Expand Down