Add missing documentation for isFile function (#996)

See ed436ba68b

Signed-off-by: anessi <anessi@users.noreply.github.com>
Co-authored-by: anessi <anessi@users.noreply.github.com>
This commit is contained in:
anessi 2023-09-01 08:52:30 +02:00 committed by GitHub
parent 5e4feb9fca
commit 8aa4389fe9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -32,6 +32,13 @@ The `envExec` function allows you to run a command with environment variables de
{{ $cmdOutpot := envExec (dict "envKey" "envValue") "./mycmd" (list "arg1" "arg2" "--flag1") }} {{ $cmdOutpot := envExec (dict "envKey" "envValue") "./mycmd" (list "arg1" "arg2" "--flag1") }}
``` ```
#### `isFile`
The `isFile` function allows you to check if a file exists. On failure, the template rendering will fail with an error message.
```yaml
{{ if isFile "./myfile" }}
```
#### `readFile` #### `readFile`
The `readFile` function allows you to read a file and return its content as the function output. On failure, the template rendering will fail with an error message. The `readFile` function allows you to read a file and return its content as the function output. On failure, the template rendering will fail with an error message.