feat(templater): Added support for file include

Adds a 'fileContent' template function to insert the literal contents
of a file specified in the template.

Signed-off-by: Niklas Wik <niklas.wik@nokia.com>
This commit is contained in:
Niklas Wik 2018-01-09 15:12:50 +02:00 committed by Vincent Ambo
parent 850fdcf3e0
commit bafb792339
4 changed files with 30 additions and 2 deletions

View file

@ -72,10 +72,11 @@ right.
Some template functions come from Go's standard library and are listed in the
[Go documentation][]. In addition the functions declared by [sprig][] are
available in kontemplate, as well as two custom functions:
available in kontemplate, as well as three custom functions:
`json`: Encodes any supplied data structure as JSON.
`passLookup`: Looks up the supplied key in [pass][]
`passLookup`: Looks up the supplied key in [pass][].
`fromFile`: Insert the contents of the given file from the resource set folder.
## Examples: