"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "buildbot/reporters/generators/buildset.py" between
buildbot-3.0.2.tar.gz and buildbot-3.1.0.tar.gz

About: Buildbot is a continuous integration testing framework (Python-based). It supports also automation of complex build systems, application deployment, and management of sophisticated software-release processes.

buildset.py  (buildbot-3.0.2):buildset.py  (buildbot-3.1.0)
skipping to change at line 20 skipping to change at line 20
# You should have received a copy of the GNU General Public License along with # You should have received a copy of the GNU General Public License along with
# this program; if not, write to the Free Software Foundation, Inc., 51 # this program; if not, write to the Free Software Foundation, Inc., 51
# Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
# #
# Copyright Buildbot Team Members # Copyright Buildbot Team Members
from twisted.internet import defer from twisted.internet import defer
from zope.interface import implementer from zope.interface import implementer
from buildbot import interfaces from buildbot import interfaces
from buildbot.process.results import statusToString
from buildbot.reporters import utils from buildbot.reporters import utils
from buildbot.reporters.message import MessageFormatter from buildbot.reporters.message import MessageFormatter
from .utils import BuildStatusGeneratorMixin from .utils import BuildStatusGeneratorMixin
@implementer(interfaces.IReportGenerator) @implementer(interfaces.IReportGenerator)
class BuildSetStatusGenerator(BuildStatusGeneratorMixin): class BuildSetStatusGenerator(BuildStatusGeneratorMixin):
wanted_event_keys = [ wanted_event_keys = [
('buildsets', None, 'complete'), ('buildsets', None, 'complete'),
skipping to change at line 62 skipping to change at line 63
builds = res['builds'] builds = res['builds']
buildset = res['buildset'] buildset = res['buildset']
# only include builds for which isMessageNeeded returns true # only include builds for which isMessageNeeded returns true
builds = [build for build in builds builds = [build for build in builds
if self.is_message_needed_by_props(build) and if self.is_message_needed_by_props(build) and
self.is_message_needed_by_results(build)] self.is_message_needed_by_results(build)]
if not builds: if not builds:
return None return None
report = yield self.build_message(self.formatter, master, reporter, "who report = yield self.buildset_message(self.formatter, master, reporter, b
le buildset", uilds,
builds, buildset['results']) buildset['results'])
return report return report
@defer.inlineCallbacks
def buildset_message(self, formatter, master, reporter, builds, results):
# The given builds must refer to builds from a single buildset
patches = []
logs = []
body = None
subject = None
msgtype = None
users = set()
for build in builds:
patches.extend(self._get_patches_for_build(build))
build_logs = yield self._get_logs_for_build(master, build)
logs.extend(build_logs)
blamelist = yield reporter.getResponsibleUsersForBuild(master, build
['buildid'])
users.update(set(blamelist))
buildmsg = yield formatter.format_message_for_build(master, build, m
ode=self.mode,
users=blamelist)
msgtype, ok = self._merge_msgtype(msgtype, buildmsg['type'])
if not ok:
continue
subject = self._merge_subject(subject, buildmsg['subject'])
body, ok = self._merge_body(body, buildmsg['body'])
if not ok:
continue
if subject is None and self.subject is not None:
subject = self.subject % {'result': statusToString(results),
'projectName': master.config.title,
'title': master.config.title,
'builder': 'whole buildset'}
return {
'body': body,
'subject': subject,
'type': msgtype,
'results': results,
'builds': builds,
'users': list(users),
'patches': patches,
'logs': logs
}
def _want_previous_build(self): def _want_previous_build(self):
return "change" in self.mode or "problem" in self.mode return "change" in self.mode or "problem" in self.mode
 End of changes. 3 change blocks. 
3 lines changed or deleted 54 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)