Skip to content

Commit

Permalink
examples: Improve exec example
Browse files Browse the repository at this point in the history
Signed-off-by: Chance Zibolski <[email protected]>
  • Loading branch information
chancez committed Sep 7, 2024
1 parent f3099f3 commit e616ac4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
9 changes: 7 additions & 2 deletions e2e/examples_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,13 @@ server {
{
file: "exec.yfg.yaml",
expected: trim(`
foo:
bar: asdf hjkl
server {
listen 443 ssl;
root /data/up1;
location / {
}
}
`),
},
{
Expand Down
11 changes: 2 additions & 9 deletions examples/exec.yfg.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
pipeline:
- name: simple-exec
exec:
command: '/bin/bash'
args: ['-c', 'echo {"foo": {"bar": "asdf hjkl"}}']

# Render the result as YAML
- name: output
yaml:
input:
- ref: simple-exec

command: 'sed'
args: ['-e', 's/listen.*;/listen 443 ssl;/', 'files/nginx.conf']

0 comments on commit e616ac4

Please sign in to comment.