From ac2dbec5de3c42f65b2f9c7a1ea5111988e7a4e5 Mon Sep 17 00:00:00 2001 From: Robin Wittler Date: Wed, 7 Sep 2011 14:16:26 +0200 Subject: [PATCH] add verbose mail messages --- build.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/build.py b/build.py index 9a18d1f..2b64efa 100755 --- a/build.py +++ b/build.py @@ -65,11 +65,12 @@ GIT_TARGET_DIR = os.path.join( os.path.basename(GIT_REPO_PATH) ) +JOB_NAME = os.environ.get('JOB_NAME') GIT_COMMITTER_EMAIL = os.environ.get('GIT_COMMITTER_EMAIL') SMTP_SERVER = 'roma.profitbricks.localdomain' -SMTP_SUBJECT = 'Build for branch %s, buildnumber %s was %s' +SMTP_SUBJECT = 'Build for job %s, branch %s, buildnumber %s was %s' SMTP_TEXT = ( - 'Build for branch %s, buildnumber %s was %s. ' + + 'Build for job %s, branch %s, buildnumber %s was %s. ' + 'Take a close look at: ' + BUILD_URL ) SMTP_BUILD_SUCCESS = 'SUCCESSFULL' @@ -109,9 +110,9 @@ def send_email(result): msg = ( 'From: %s\n' %(SMTP_FROM) + 'To: %s\n' %(GIT_COMMITTER_EMAIL) + - 'Subject: %s\n' %(SMTP_SUBJECT %(GIT_DEBIAN_BRANCH, BUILD_NUMBER, + 'Subject: %s\n' %(SMTP_SUBJECT %(JOB_NAME, GIT_DEBIAN_BRANCH, BUILD_NUMBER, result)) + - '%s\n' %(SMTP_TEXT %(GIT_DEBIAN_BRANCH, BUILD_NUMBER, result)) + '%s\n' %(SMTP_TEXT %(JOB_NAME, GIT_DEBIAN_BRANCH, BUILD_NUMBER, result)) ) logger.info('Sending this message: %s', msg) smtp.sendmail(SMTP_FROM, GIT_COMMITTER_EMAIL, msg) -- 2.39.5