Skip to content
This repository was archived by the owner on Mar 20, 2024. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 37 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand All @@ -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 `<owner>/<repo>`
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/<builder-name>" # <builder-name> should replaced by the real builder name

[repo.NAME.status.LABEL2]
context = "buildbot/<builder2-name>" # <builder2-name> 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.

Expand Down