From 2143ddf36cd0f68180e8594ba8ef046a9a5f0ea2 Mon Sep 17 00:00:00 2001 From: Ian Zimmerman Date: Thu, 15 Jan 2009 11:51:24 -0800 Subject: [PATCH] BuildRequest is created with optional Properties. Make one of these, 'owner', collected by the resultant Build and added to the set of *interested users* to which status notifications will be sent, depending on the configuration for each status object. --- buildbot/process/base.py | 7 +++++++ buildbot/status/builder.py | 2 +- docs/buildbot.texinfo | 6 ++++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/buildbot/process/base.py b/buildbot/process/base.py index d70ab0f..7bc24db 100644 --- a/buildbot/process/base.py +++ b/buildbot/process/base.py @@ -42,6 +42,8 @@ class BuildRequest: @type properties: Properties object @ivar properties: properties that should be applied to this build + 'owner' property is used by Build objects to collect + the list returned by getInterestedUsers @ivar status: the IBuildStatus object which tracks our status @@ -438,6 +440,11 @@ class Build: self.build_status.setBlamelist(self.blamelist()) self.build_status.setProgress(self.progress) + # gather owners from build requests + owners = [r.properties['owner'] for r in self.requests + if r.properties.has_key('owner')] + self.setProperty('owners', owners, self.reason) + self.results = [] # list of FAILURE, SUCCESS, WARNINGS, SKIPPED self.result = SUCCESS # overall result, may downgrade after each step self.text = [] # list of text string lists (text2) diff --git a/buildbot/status/builder.py b/buildbot/status/builder.py index 986e165..a73febf 100644 --- a/buildbot/status/builder.py +++ b/buildbot/status/builder.py @@ -996,7 +996,7 @@ class BuildStatus(styles.Versioned): def getInterestedUsers(self): # TODO: the Builder should add others: sheriffs, domain-owners - return self.blamelist + return self.blamelist + self.properties.getProperty('owners', []) def getSteps(self): """Return a list of IBuildStepStatus objects. For invariant builds diff --git a/docs/buildbot.texinfo b/docs/buildbot.texinfo index 9a1c674..699fe98 100644 --- a/docs/buildbot.texinfo +++ b/docs/buildbot.texinfo @@ -1743,6 +1743,12 @@ this might be changed, to have the @code{Build} define @emph{what} gets built, and a separate @code{BuildProcess} (provided by the Builder) to define @emph{how} it gets built. +@code{BuildRequest} is created with optional @code{Properties}. One +of these, @code{owner}, is collected by the resultant @code{Build} and +added to the set of @emph{interested users} to which status +notifications will be sent, depending on the configuration for each +status object. + The @code{BuildRequest} may be mergeable with other compatible @code{BuildRequest}s. Builds that are triggered by incoming Changes will generally be mergeable. Builds that are triggered by user -- 2.11.4.GIT