2.5.15.11. HttpStatusPush

from buildbot.plugins import reporters
sp = reporters.HttpStatusPush(serverUrl="http://example.com/submit")
c['services'].append(sp)

HttpStatusPush sends HTTP POST requests to serverUrl. The body of request contains json-encoded data of the build as returned by the data API. It is useful to create a status front end outside of Buildbot for better scalability.

Note

The json data object sent is completely different from the one that was generated by 0.8.x buildbot. It is indeed generated using data api.

class buildbot.reporters.HttpStatusPush(serverUrl, auth=None, headers=None, generators=None, debug=None, verify=None)
Parameters:
  • serverUrl (string) – The url where to do the HTTP POST request

  • auth – The authentication method to use. Refer to the documentation of the requests library for more information.

  • headers (dict) – Pass custom headers to HTTP request.

  • generators (list of IReportGenerator instances) – A list of report generators that will be used to generate reports to be sent by this reporter. Currently the reporter will consider only the report generated by the first generator.

  • debug (boolean) – Logs every requests and their response

  • verify (boolean) – Disable ssl verification for the case you use temporary self signed certificates

  • skipEncoding (boolean) – Disables encoding of json data to bytes before pushing to server

Json object spec

The default json object sent is a build object augmented with some more data as follow.

{
    "url": "http://yourbot/path/to/build",
    "<build data api values>": "[...]",
    "buildset": "<buildset data api values>",
    "builder": "<builder data api values>",
    "buildrequest": "<buildrequest data api values>"
}

If you want another format, don’t hesitate to use the format_fn parameter to customize the payload. The build parameter given to that function is of type build, optionally enhanced with properties, steps, and logs information.