diff --git a/README.md b/README.md index c9f4a727..2457056d 100644 --- a/README.md +++ b/README.md @@ -107,7 +107,8 @@ the name of the repository you are configuring homu for. 6. Add a Webhook to your continuous integration service, if necessary. You don't need this if using Travis/Appveyor. - - Buildbot + + - Buildbot 0.8 Insert the following code to the `master.cfg` file: @@ -117,9 +118,43 @@ the name of the repository you are configuring homu for. c['status'].append(HttpStatusPush( serverUrl='http://HOST:PORT/buildbot', extra_post_params={'secret': 'repo.NAME.buildbot.secret in cfg.toml'}, - )) + )) + ``` + + - Buildbot 0.9 via GitHub Status + + Buildbot 0.9 support [GitHubStatusPush](http://docs.buildbot.net/latest/manual/cfg-reporters.html#githubstatuspush), + so we can use this to integrate with GitHub and Buildbot 0.9. + + Buildbot 0.9 support [GithubStatusPush](http://docs.buildbot.net/latest/manual/cfg-reporters.html#githubstatuspush), + so we can use this to integrate with Github and Buildbot 0.9. + + Insert the following code to the `master.cfg` file: + + ```python + from buildbot.plugins import reporters, util + from buildbot.process.properties import Interpolate + + context = Interpolate("buildbot/%(prop:buildername)s") + gs = reporters.GitHubStatusPush(token='A GitHub personal access token', + context=context, + startDescription='Build started.', + endDescription='Build done.') + c['services'].append(gs) ``` + **Note**: Buildbot 0.9 use project to detect the repository at GitHub. So made your `project` to `/` + in [GitPoller](http://docs.buildbot.net/latest/manual/cfg-changesources.html#gitpoller). + + Now the config of the repository in Homu's config file should looks like below: + + ```toml + [repo.NAME.status.LABEL1] + context = "buildbot/" # should replaced by the real builder name + + [repo.NAME.status.LABEL2] + context = "buildbot/" # should replaced by the real builder name + ``` 7. Go through the rest of your `cfg.toml` and uncomment (and change, if needed) parts of the config you'll need.