forked from argoproj/argo-workflows
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexit-handler-step-level.yaml
41 lines (39 loc) · 1.12 KB
/
exit-handler-step-level.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
# This example demonstrates a steps level exit handler that executes at the end of the step
## irrespective of the success, failure, or error of the step.
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: exit-handler-step-level-
spec:
entrypoint: main
templates:
- name: main
steps:
- - name: hello1
onExit: exit
template: print-message
arguments:
parameters: [{name: message, value: "hello1"}]
- - name: hello2a
onExit: exit
template: print-message
arguments:
parameters: [{name: message, value: "hello2a"}]
- name: hello2b
onExit: exit
template: print-message
arguments:
parameters: [{name: message, value: "hello2b"}]
- name: exit
container:
image: busybox
command: [echo]
args: ["step cleanup"]
- name: print-message
inputs:
parameters:
- name: message
container:
image: busybox
command: [echo]
args: ["{{inputs.parameters.message}}"]