diff --git a/examples/command_file.sh b/examples/command_file.sh new file mode 100644 index 0000000..f6a321a --- /dev/null +++ b/examples/command_file.sh @@ -0,0 +1,3 @@ +# This file is read from command_file.yaml +# Go's text/teplate +echo "{{.Task.Name}}" diff --git a/examples/command_file.yaml b/examples/command_file.yaml new file mode 100644 index 0000000..2ccae2e --- /dev/null +++ b/examples/command_file.yaml @@ -0,0 +1,7 @@ +--- +phases: +- name: main + tasks: + - name: read command from a file + command: + command_file: command_file.sh diff --git a/examples/main_test.go b/examples/main_test.go index a24462a..25be4f4 100644 --- a/examples/main_test.go +++ b/examples/main_test.go @@ -16,6 +16,10 @@ func TestBuildflow(t *testing.T) { //nolint:funlen title: "hello world", file: "hello_world.yaml", }, + { + title: "read command from a file (task.command_file)", + file: "command_file.yaml", + }, { title: "run tasks in parallel", file: "parallel.yaml",