removing unused satus cruft from taskotron buildmaster in ci
This commit is contained in:
parent
6ade29c415
commit
b385478b39
1 changed files with 0 additions and 77 deletions
|
@ -271,86 +271,9 @@ authz_cfg=authz.Authz(
|
||||||
stopAllBuilds = False,
|
stopAllBuilds = False,
|
||||||
cancelPendingBuild = 'auth',
|
cancelPendingBuild = 'auth',
|
||||||
)
|
)
|
||||||
c['status'].append(html.WebStatus(http_port=8080, authz=authz_cfg,
|
|
||||||
change_hook_dialects={'base':True}))
|
|
||||||
c['status'].append(html.WebStatus(http_port=8010, authz=authz_cfg))
|
c['status'].append(html.WebStatus(http_port=8010, authz=authz_cfg))
|
||||||
|
|
||||||
|
|
||||||
from buildbot.status.mail import MailNotifier
|
|
||||||
from buildbot.status.builder import Results
|
|
||||||
|
|
||||||
import cgi
|
|
||||||
|
|
||||||
# http://docs.buildbot.net/current/manual/cfg-statustargets.html#mailnotifier
|
|
||||||
def html_message_formatter(mode, name, build, results, master_status):
|
|
||||||
"""Provide a customized message to Buildbot's MailNotifier.
|
|
||||||
|
|
||||||
The last 80 lines of the log are provided as well as the changes
|
|
||||||
relevant to the build. Message content is formatted as html.
|
|
||||||
"""
|
|
||||||
result = Results[results]
|
|
||||||
|
|
||||||
limit_lines = 80
|
|
||||||
text = list()
|
|
||||||
text.append(u'<h4>Build status: %s</h4>' % result.upper())
|
|
||||||
text.append(u'<table cellspacing="10"><tr>')
|
|
||||||
text.append(u"<td>Buildslave for this Build:</td><td><b>%s</b></td></tr>" % build.getSlavename())
|
|
||||||
if master_status.getURLForThing(build):
|
|
||||||
text.append(u'<tr><td>Complete logs for all build steps:</td><td><a href="%s">%s</a></td></tr>'
|
|
||||||
% (master_status.getURLForThing(build),
|
|
||||||
master_status.getURLForThing(build))
|
|
||||||
)
|
|
||||||
text.append(u'<tr><td>Build Reason:</td><td>%s</td></tr>' % build.getReason())
|
|
||||||
text.append(u'</table>')
|
|
||||||
text.append(u'<br>')
|
|
||||||
|
|
||||||
logs = []
|
|
||||||
steps = build.getSteps()
|
|
||||||
for step in steps:
|
|
||||||
if step.getName().endswith('test'):
|
|
||||||
logs = step.getLogs()
|
|
||||||
break
|
|
||||||
|
|
||||||
# logs within a step are in reverse order. Search back until we find stdio
|
|
||||||
for log in reversed(logs):
|
|
||||||
if log.getName() == 'stdio':
|
|
||||||
break
|
|
||||||
|
|
||||||
name = "%s.%s" % (log.getStep().getName(), log.getName())
|
|
||||||
content = log.getText().splitlines() # Note: can be VERY LARGE
|
|
||||||
url = u'%s/steps/%s/logs/%s' % (master_status.getURLForThing(build),
|
|
||||||
log.getStep().getName(),
|
|
||||||
log.getName())
|
|
||||||
|
|
||||||
text.append(u'<i>Detailed log of last build step:</i> <a href="%s">%s</a>'
|
|
||||||
% (url, url))
|
|
||||||
text.append(u'<br>')
|
|
||||||
text.append(u'<h4>Last %d lines of "%s"</h4>' % (limit_lines, name))
|
|
||||||
unilist = list()
|
|
||||||
for line in content[len(content)-limit_lines:]:
|
|
||||||
unilist.append(cgi.escape(unicode(line,'utf-8')))
|
|
||||||
text.append(u'<pre>')
|
|
||||||
text.extend(unilist)
|
|
||||||
text.append(u'</pre>')
|
|
||||||
text.append(u'<br><br>')
|
|
||||||
text.append(u'<b>-The Buildbot</b>')
|
|
||||||
return {
|
|
||||||
'body': u"\n".join(text),
|
|
||||||
'type': 'html'
|
|
||||||
}
|
|
||||||
'''
|
|
||||||
mn = MailNotifier(fromaddr='taskotron@fedoraproject.org',
|
|
||||||
sendToInterestedUsers=False,
|
|
||||||
subject="%(prop:taskname)s %(result)s in %(projectName)s on %(builder)s",
|
|
||||||
mode=('failing', 'exception', 'warnings'),
|
|
||||||
extraRecipients=['qa-taskotron-admin-members@fedoraproject.org'],
|
|
||||||
relayhost="bastion.phx2.fedoraproject.org",
|
|
||||||
messageFormatter=html_message_formatter)
|
|
||||||
|
|
||||||
|
|
||||||
c['status'].append(mn)
|
|
||||||
'''
|
|
||||||
|
|
||||||
####### PROJECT IDENTITY
|
####### PROJECT IDENTITY
|
||||||
|
|
||||||
# the 'title' string will appear at the top of this buildbot
|
# the 'title' string will appear at the top of this buildbot
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue