github.com/upcmd/up@v0.8.1-0.20230108151705-ad8b797bf04f/tests/functests/c0002.yml (about) 1 doc_meta: | 2 folder: quick-start 3 title: Multiple Steps 4 head: A task could be a sequential steps of implementation of a func. You can chaine a series of steps in a task 5 6 sections: 7 - title: Brief of shell func 8 content: | 9 A shell func is a func implementation, in which you could add one or multiple line of shell scripts to be executed 10 11 We will call the step in the array of steps shell func as sub step to just avoid confusion, each func implementation in a task is called a step 12 13 - title: ignoreError flag 14 content: | 15 A flag in flag list attaching to a func dictates some behavior, in such a way it provides additional feature to the execution, workflow etc 16 17 Normally a successful shell execution returns exit code 0, ignoreError is to allow the executio to contiue to next or end without a return code of 0 18 19 In this demo, it reports the sub step has failed with its own return code, but it continue to complete all execution 20 21 - title: Demo 22 log: yes 23 24 related: 25 refs: 26 - title: Multiple steps 27 link: ../../shell-func/c0052/ 28 - title: error handling 29 link: ../../test-debug/error_handling/ 30 31 tasks: 32 - 33 name: task 34 desc: this is task 35 task: 36 - 37 func: shell 38 desc: do step1 in shell func 39 do: 40 - echo "hello" 41 - echo "world" 42 43 - 44 func: shell 45 desc: do step2 in shell func 46 flags: 47 - ignoreError 48 do: 49 - echo "hello" 50 - echo "I got exception"|grep non-exist 51 - echo "world"