github.com/upcmd/up@v0.8.1-0.20230108151705-ad8b797bf04f/tests/functests/c0005.yml (about) 1 doc_meta: | 2 folder: quick-start 3 title: manage dependencies 4 head: | 5 Use call func to chain dependencies 6 7 We are used to the way the dependencies are managed in build tasks, such as in Makefile, we list the pre tasks to be executed prior to the named task 8 9 In UP, we simply use call instead 10 11 It is designed this way for composibility and flexibility so that task and steps are consumable and reusable. 12 13 sections: 14 - title: Demo 15 log: yes 16 17 notes: 18 goal: 19 - to ues call to achieve the goal of task composition 20 why: 21 - it is like dep but allow pre and post task using call 22 23 tasks: 24 - 25 name: pre_task 26 desc: this is pre-task 27 task: 28 - 29 func: shell 30 do: 31 - echo "hello" 32 33 - 34 name: post_task 35 desc: this is post-task 36 task: 37 - 38 func: shell 39 desc: do step1 in shell func 40 do: 41 - echo "world" 42 43 - 44 name: 2ndtask 45 task: 46 - 47 func: shell 48 desc: to test multiple refs 49 do: 50 - echo "this is 2nd task" 51 52 - 53 name: task 54 desc: this is the task and expect the final message (hello I love this world) 55 task: 56 - 57 func: call 58 do: pre_task 59 - 60 func: shell 61 do: 62 - echo " I love this " 63 - 64 func: call 65 do: 66 - post_task 67 - 2ndtask