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