Skip to content

Commit

Permalink
add 'project' and 'repository' to force-build form
Browse files Browse the repository at this point in the history
Fixes #999
  • Loading branch information
Dustin J. Mitchell committed Oct 22, 2010
1 parent a46cf0d commit 64bd138
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
11 changes: 7 additions & 4 deletions master/buildbot/status/web/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,15 @@ def force(self, req, auth_ok=False):
reason = req.args.get("comments", ["<no reason specified>"])[0]
branch = req.args.get("branch", [""])[0]
revision = req.args.get("revision", [""])[0]
repository = req.args.get("repository", [""])[0]
project = req.args.get("project", [""])[0]

r = "The web-page 'force build' button was pressed by '%s': %s\n" \
% (html.escape(name), html.escape(reason))
log.msg("web forcebuild of builder '%s', branch='%s', revision='%s'"
" by user '%s'" % (self.builder_status.getName(), branch,
revision, name))
log.msg("web forcebuild of builder '%s', branch='%s', revision='%s',"
" repository='%s', project='%s' by user '%s'" % (
self.builder_status.getName(), branch, revision, repository,
project, name))

# check if this is allowed
if not auth_ok:
Expand Down Expand Up @@ -148,7 +151,7 @@ def force(self, req, auth_ok=False):
# now, so someone can write this support. but it requires a
# buildbot.changes.changes.Change instance which is tedious at this
# stage to compute
s = SourceStamp(branch=branch, revision=revision)
s = SourceStamp(branch=branch, revision=revision, project=project, repository=repository)
try:
c = interfaces.IControl(self.getBuildmaster(req))
bc = c.getBuilder(self.builder_status.getName())
Expand Down
8 changes: 8 additions & 0 deletions master/buildbot/status/web/templates/forms.html
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,14 @@
<span class="label">Revision to build:</span>
<input type='text' name='revision' />
</div>
<div class="row">
<span class="label">Repository to build:</span>
<input type='text' name='repository' />
</div>
<div class="row">
<span class="label">Project to build:</span>
<input type='text' name='project' />
</div>
{% for i in range(1,4) %}
<div class="row">
Property {{ i }}
Expand Down

0 comments on commit 64bd138

Please sign in to comment.