[usage] submit job.yaml -i send-email.yaml send_email.subject=$subject submit job.yaml -i send-email-on-fail.yaml on_fail.send_email.subject=$subject
values of subject are limited to: job_failed/job_debug/borrow_success/borrow_failed
Signed-off-by: Wei Jihui weijihuiall@163.com --- jobs/send-email-on-fail.yaml | 7 +++++++ jobs/send-email.yaml | 6 ++++++ 2 files changed, 13 insertions(+) create mode 100644 jobs/send-email-on-fail.yaml create mode 100644 jobs/send-email.yaml
diff --git a/jobs/send-email-on-fail.yaml b/jobs/send-email-on-fail.yaml new file mode 100644 index 00000000..a38eb52d --- /dev/null +++ b/jobs/send-email-on-fail.yaml @@ -0,0 +1,7 @@ +# use this send-email-on-fail.yaml by: +# submit job.yaml -i send-email-on-fail.yaml on_fail.send_email.subject=$subject +# values of $subject are limited to job_failed/job_debug/borrow_success/borrow_failed. + +on_fail: + send_email: + subject: job_failed diff --git a/jobs/send-email.yaml b/jobs/send-email.yaml new file mode 100644 index 00000000..8f8b48b9 --- /dev/null +++ b/jobs/send-email.yaml @@ -0,0 +1,6 @@ +# use this send_email.yaml by: +# submit job.yaml -i send-email.yaml send_email.subject=$subject +# values of $subject are limited to job_failed/job_debug/borrow_success/borrow_failed. + +send_email: + subject: job_failed