2018-03-03 23:54:42 +02:00
|
|
|
version: '2'
|
2018-03-04 21:20:26 +02:00
|
|
|
|
2018-03-04 20:39:14 +02:00
|
|
|
vars:
|
|
|
|
NESTED2: "{{.NESTED1}}-TaskfileVars"
|
2018-03-04 21:20:26 +02:00
|
|
|
|
2018-02-18 14:50:39 +02:00
|
|
|
tasks:
|
|
|
|
default:
|
|
|
|
deps: [hello]
|
|
|
|
|
|
|
|
hello:
|
|
|
|
cmds:
|
|
|
|
- echo {{.FOO}} > foo.txt
|
|
|
|
- echo {{.BAR}} > bar.txt
|
|
|
|
- echo {{.BAZ}} > baz.txt
|
|
|
|
- echo '{{.TMPL_FOO}}' > tmpl_foo.txt
|
|
|
|
- echo '{{.TMPL_BAR}}' > tmpl_bar.txt
|
|
|
|
- echo '{{.TMPL_FOO2}}' > tmpl_foo2.txt
|
|
|
|
- echo '{{.TMPL_BAR2}}' > tmpl_bar2.txt
|
|
|
|
- echo '{{.SHTMPL_FOO}}' > shtmpl_foo.txt
|
|
|
|
- echo '{{.SHTMPL_FOO2}}' > shtmpl_foo2.txt
|
|
|
|
- echo '{{.NESTEDTMPL_FOO}}' > nestedtmpl_foo.txt
|
|
|
|
- echo '{{.NESTEDTMPL_FOO2}}' > nestedtmpl_foo2.txt
|
|
|
|
- echo {{.FOO2}} > foo2.txt
|
|
|
|
- echo {{.BAR2}} > bar2.txt
|
|
|
|
- echo {{.BAZ2}} > baz2.txt
|
|
|
|
- echo '{{.TMPL2_FOO}}' > tmpl2_foo.txt
|
|
|
|
- echo '{{.TMPL2_BAR}}' > tmpl2_bar.txt
|
|
|
|
- echo '{{.TMPL2_FOO2}}' > tmpl2_foo2.txt
|
|
|
|
- echo '{{.TMPL2_BAR2}}' > tmpl2_bar2.txt
|
|
|
|
- echo '{{.SHTMPL2_FOO}}' > shtmpl2_foo.txt
|
|
|
|
- echo '{{.SHTMPL2_FOO2}}' > shtmpl2_foo2.txt
|
|
|
|
- echo '{{.NESTEDTMPL2_FOO2}}' > nestedtmpl2_foo2.txt
|
|
|
|
- echo {{.OVERRIDE}} > override.txt
|
2018-03-04 20:39:14 +02:00
|
|
|
- echo '{{.NESTED3}}' > nested.txt
|
2019-12-08 00:43:10 +02:00
|
|
|
- echo '{{.TASK}}' > task_name.txt
|
2018-02-18 14:50:39 +02:00
|
|
|
vars:
|
|
|
|
FOO: foo
|
|
|
|
BAR: $echo bar
|
|
|
|
BAZ:
|
|
|
|
sh: echo baz
|
|
|
|
TMPL_FOO: "{{.FOO}}"
|
|
|
|
TMPL_BAR: "{{.BAR}}"
|
|
|
|
TMPL_FOO2: "{{.FOO2}}"
|
|
|
|
TMPL_BAR2: "{{.BAR2}}"
|
|
|
|
SHTMPL_FOO:
|
|
|
|
sh: "echo '{{.FOO}}'"
|
|
|
|
SHTMPL_FOO2:
|
|
|
|
sh: "echo '{{.FOO2}}'"
|
|
|
|
NESTEDTMPL_FOO: "{{.TMPL_FOO}}"
|
|
|
|
NESTEDTMPL_FOO2: "{{.TMPL2_FOO2}}"
|
|
|
|
OVERRIDE: "bar"
|
2018-03-04 20:39:14 +02:00
|
|
|
NESTED3: "{{.NESTED2}}-TaskVars"
|
2018-02-18 14:50:39 +02:00
|
|
|
|
|
|
|
invalid-var-tmpl:
|
|
|
|
vars:
|
|
|
|
CHARS: "abcd"
|
|
|
|
INVALID: "{{range .CHARS}}no end"
|