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'
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)