summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ick2/sendmail.py19
1 files changed, 11 insertions, 8 deletions
diff --git a/ick2/sendmail.py b/ick2/sendmail.py
index 423b9f6..2c2b4d4 100644
--- a/ick2/sendmail.py
+++ b/ick2/sendmail.py
@@ -19,14 +19,15 @@ import smtplib
body_tmpl = """\
-This is a notification from ick, the CI system.
+This is a build notification from ick.
-Project: {project}
-Build ID: {build_id}
-Log ID: {log}
-Worker: {worker}
-Status: {status}
-Exit code: {exit_code}
+Controller: {controller_url}
+Project: {project}
+Build ID: {build_id}
+Log ID: {log}
+Worker: {worker}
+Status: {status}
+Exit code: {exit_code}
Build log is attached.
@@ -37,6 +38,7 @@ class Sendmail:
config_fields = [
'from_addr',
+ 'controller_url',
'smtp_server',
'smtp_port',
'smtp_user',
@@ -79,7 +81,8 @@ class Sendmail:
def get_body(self, build):
msg = email.message.Message()
- msg.set_payload(body_tmpl.format(**build))
+ msg.set_payload(body_tmpl.format(
+ controller_url=self._config['controller_url'], **build))
msg.add_header('Content-Type', 'text/plain')
return msg