-
Notifications
You must be signed in to change notification settings - Fork 40
/
subjob.yaml
45 lines (41 loc) · 1.19 KB
/
subjob.yaml
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
name: sample job with sub jobs
tasks:
- name: hello task
image: ubuntu:mantic
run: echo start of job
- var: subJobOutput
name: sub job with output
subjob:
name: my sub job with output
output: "{{ tasks.dataStuff }}"
tasks:
- var: dataStuff
name: hello sub task job 1
image: ubuntu:mantic
run: echo -n data > $TORK_OUTPUT
- name: running 2 jobs in parallel
parallel:
tasks:
- name: sample job 1
subjob:
name: my sub job 1
tasks:
- name: hello sub task job 1
image: ubuntu:mantic
run: echo start of sub-job
- name: bye sub task job 1
image: ubuntu:mantic
run: echo end of sub-job
- name: sample job 2
subjob:
name: my sub job 2
tasks:
- name: hello sub task job 2
image: ubuntu:mantic
run: echo start of sub-job
- name: bye sub task job 2
image: ubuntu:mantic
run: echo end of sub-job
- name: bye task
image: ubuntu:mantic
run: echo end of job