Skip to content
This repository has been archived by the owner on Sep 29, 2021. It is now read-only.

Commit

Permalink
docs: add examples of configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
suzuki-shunsuke committed Oct 14, 2020
1 parent c059e0b commit aa09f04
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
8 changes: 8 additions & 0 deletions examples/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ func TestBuildflow(t *testing.T) {
title: "task.when is true",
file: "task_when_true.yaml",
},
{
title: "read_file",
file: "read_file.yaml",
},
{
title: "command's standard input",
file: "stdin.yaml",
},
{
title: "buildflow run fails as expected",
file: "fail.yaml",
Expand Down
17 changes: 17 additions & 0 deletions examples/read_file.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
phases:
- name: main
tasks:
- name: foo
read_file:
path: read_file.yaml
- name: bar
command:
command: |
echo "$FOO"
env:
- key: FOO
value: |
{{with GetTaskByName .Tasks "foo"}}{{.File.Text}}{{end}}
dependency:
- foo
10 changes: 10 additions & 0 deletions examples/stdin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
phases:
- name: main
tasks:
- name: hello
command:
stdin: |
foo
bar
command: grep bar

0 comments on commit aa09f04

Please sign in to comment.