github.com/upcmd/up@v0.8.1-0.20230108151705-ad8b797bf04f/tests/functests/c0078.yml (about) 1 doc_meta: | 2 folder: dvars 3 title: dvar to global 4 head: | 5 Showcase that you can use flag reg to extend the local defined dvar to be available in global runtime so that other func step could reference and use it 6 7 sections: 8 - title: Demo 9 log: yes 10 11 tasks: 12 - 13 name: task 14 task: 15 - 16 func: cmd 17 vars: 18 school_name: sydney grammar 19 school_address: 1 fox road, sydney, nsw 2000 20 dvars: 21 - name: school_details 22 value: '{{.school_name}} : {{.school_address}}' 23 flags: [reg] 24 do: 25 - name: print 26 cmd: '{{.school_name}}' 27 28 - name: print 29 cmd: '{{.school_details}}' 30 31 - 32 func: cmd 33 do: 34 - name: print 35 cmd: '{{.school_address}}'