Skip to content

Commit

Permalink
Add start callback to GerritStatusPush docs
Browse files Browse the repository at this point in the history
Documentation updated, and mentioned in release notes.
  • Loading branch information
jstultz committed Aug 1, 2012
1 parent 660f61e commit b6dc6bd
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
18 changes: 16 additions & 2 deletions master/docs/manual/cfg-statustargets.rst
Expand Up @@ -1461,14 +1461,28 @@ GerritStatusPush
# message, verified, reviewed
return message, (result == SUCCESS or -1), 0

def gerritStartCB(builderName, build, arg):
message = "Buildbot started compiling your patchset\n"
message += "on configuration: %s\n" % builderName

if arg:
message += "\nFor more details visit:\n"
message += status.getURLForThing(build) + "\n"

return message

c['buildbotURL'] = 'http://buildbot.example.com/'
c['status'].append(GerritStatusPush('127.0.0.1', 'buildbot',
reviewCB=gerritReviewCB,
reviewArg=c['buildbotURL']))
reviewArg=c['buildbotURL'],
startCB=gerritStartCB,
startArg=c['buildbotURL']))

GerritStatusPush sends review of the :class:`Change` back to the Gerrit server.
GerritStatusPush sends review of the :class:`Change` back to the Gerrit server,
optionally also sending a message when a build is started.
``reviewCB`` should return a tuple of message, verified, reviewed. If message
is ``None``, no review will be sent.
``startCB`` should return a message.

.. [#] Apparently this is the same way http://buildd.debian.org displays build status
Expand Down
2 changes: 2 additions & 0 deletions master/docs/release-notes.rst
Expand Up @@ -122,6 +122,8 @@ Features
to render a nice Login link in WebStatus for unauthenticated users if
``useHttpHeader`` and ``httpLoginUrl`` are set.

* Added an optional build start callback to ``buildbot.status.status_gerrit.GerritStatusPush``

Slave
-----

Expand Down

0 comments on commit b6dc6bd

Please sign in to comment.