-
Notifications
You must be signed in to change notification settings - Fork 4
/
c0002.yml
51 lines (42 loc) · 1.56 KB
/
c0002.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
doc_meta: |
folder: quick-start
title: Multiple Steps
head: A task could be a sequential steps of implementation of a func. You can chaine a series of steps in a task
sections:
- title: Brief of shell func
content: |
A shell func is a func implementation, in which you could add one or multiple line of shell scripts to be executed
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
- title: ignoreError flag
content: |
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
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
In this demo, it reports the sub step has failed with its own return code, but it continue to complete all execution
- title: Demo
log: yes
related:
refs:
- title: Multiple steps
link: ../../shell-func/c0052/
- title: error handling
link: ../../test-debug/error_handling/
tasks:
-
name: task
desc: this is task
task:
-
func: shell
desc: do step1 in shell func
do:
- echo "hello"
- echo "world"
-
func: shell
desc: do step2 in shell func
flags:
- ignoreError
do:
- echo "hello"
- echo "I got exception"|grep non-exist
- echo "world"