-
Notifications
You must be signed in to change notification settings - Fork 4
/
c0041.yml
49 lines (42 loc) · 1012 Bytes
/
c0041.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
doc_meta: |
folder: shell-func
title: check result
head: |
Demo the feature that you could use .last_result.Code and .last_result.Output as condition to orchestrate your workflow
sections:
- title: Demo
log: yes
notes:
goal:
- add feature of template func to register a var into global var map
tasks:
-
name: task
desc: test the exit scenarios due to different types of validation
task:
-
func: shell
desc: step1
do:
- echo hello
- echo world
-
func: shell
desc: step2
do:
- echo tom
- echo "{{.last_result.Code}}"
- echo "{{.last_result.Output}}"
- echo hanks
-
func: shell
desc: step3
dvars:
- name: greet
value: |
hello: {{.last_result.Output}}
do:
- echo tom
- echo "{{.last_result.Output}}"
- echo hanks
- echo "{{.greet}}"