github.com/upcmd/up@v0.8.1-0.20230108151705-ad8b797bf04f/tests/functests/c0064.yml (about) 1 doc_meta: | 2 folder: cmd-func 3 title: print message 4 head: | 5 cmd func is a core func to wrap up some actions, for example, query yml string/object, register/deRegister a var, exit the task, template etc. It focus on core functionalities implementation provided by UP cmd cli internals 6 7 sections: 8 - title: print cmd 9 content: | 10 The print cmd simply print out the message, either it is a raw message, or a templated message referencing to vars. This is normally used for tracing and debugging 11 12 - title: Demo 13 log: yes 14 15 notes: 16 goal: add cmd support for cmd func 17 18 vars: 19 student: 20 name: Tom 21 gender: Male 22 school: Sydney Grammar 23 24 tasks: 25 26 - 27 name: task 28 task: 29 - func: shell 30 do: 31 - echo "hello 1" 32 33 - func: cmd 34 do: 35 - name: print 36 desc: print some info 37 cmd: "hello, this is print commmand" 38 39 - 40 name: print 41 cmd: "hello, {{.student.school}}" 42 43 - name: print 44 cmd: | 45 hello, {{.student.school}} 46 hello, {{.student.school}}