-
-
Notifications
You must be signed in to change notification settings - Fork 867
Closed
Description
Lets assume that there is a job which runs one task:
- task: task1
file: foo/task1.yml
and we have some resource sending out notifications about success or failure (e.g. via email or slack). It goes like this (assuming that resources are configured):
- task: task1
file: foo/task1.yml
- aggregate:
- conditions: [success]
put: email
params:
text: Success!
- conditions: [failure]
put: email
params:
text: Failure!
That already is increase from 2 lines to 11. Now, lets suppose that we have 2 tasks running inside job:
- task: task1
file: foo/task1.yml
- aggregate:
- conditions: [success]
name: task1-succeeded
do:
- task: task2
file: foo/task2.yml
- aggregate:
- conditions: [success]
put: email
params:
text: Success!
- conditions: [failure]
put: email
params:
text: Failure!
- conditions: [failure]
put: email
params:
text: Failure!
Which is 21 lines. Adding 3rd and 4th tasks would be overkill.
I'm looking for try / catch / finally kind of approach, where one could add just one error handler at the end or something like this.
Metadata
Metadata
Assignees
Labels
No labels