<div dir="ltr">Hi Shulhan,<div><br></div><div>The www hooks are now customizable via the buildbot plugin system</div><div><br></div><div>The default one are configured here. </div><div><a href="https://github.com/buildbot/buildbot/blob/master/master/setup.py#L415">https://github.com/buildbot/buildbot/blob/master/master/setup.py#L415</a><br></div><div><br></div><div>I would suggest you to create your own python package and distribute your buildbot-mattermost plugin on pypi.</div><div><br></div><div>If your plugin is simple enough, you can also fit it in the master.cfg. See doc at</div><div><a href="http://docs.buildbot.net/latest/manual/cfg-wwwhooks.html#custom-hooks">http://docs.buildbot.net/latest/manual/cfg-wwwhooks.html#custom-hooks</a><br></div><div><br></div><div>Regards</div><div>Pierre</div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Nov 2, 2017 at 7:52 AM Shulhan <<a href="mailto:m.shulhan@gmail.com">m.shulhan@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello all,<br>
<br>
Current enviroments,<br>
<br>
- buildbot version is 0.9.12.<br>
- CentOS 7<br>
- Python 2.7.5<br>
- Twisted 17.9.0<br>
<br>
I have a custom hook that triggered from Mattermost slash command,<br>
<br>
  /change_hook/mattermost<br>
<br>
Previously, using buildbot v0.9.0 my custom hook worked [1] flawlessly.<br>
After upgrading to v0.9.12, I need to refactor my custom hook into this<br>
script [2].<br>
<br>
I copied the script to `/usr/lib/python2.7/site-packages/buildbot/www/hooks`<br>
and restart buildmaster process.<br>
<br>
When executing slash command from Mattermost, I got the following response,<br>
<br>
  [2017/11/02 06:37:16 UTC] [EROR] /api/v4/commands/execute:command code=500 rid=dyxr58jez7ffpynkor74e4yi5e uid=7mz1mju7dbyu7n788w7pyswcmr ip=10.8.0.3 Command with a trigger of 'build' returned response 400 The dialect specified, 'mattermost', is not registered as a buildbot.webhook plugin [details: The dialect specified, 'mattermost', is not registered as a buildbot.webhook plugin]<br>
<br>
Log from buildmaster,<br>
<br>
  2017-11-02 06:37:16+0000 [_GenericHTTPChannelProtocol,0,172.32.1.208] The dialect specified, 'mattermost', is not registered as a buildbot.webhook plugin<br>
<br>
My master.cfg contains,<br>
<br>
c['www'] = {<br>
        ...<br>
        ,       "change_hook_dialects":{<br>
                        "github": {<br>
                                "secret": "{{ buildmaster_github_secret }}"<br>
                        ,       "strict": True<br>
                        }<br>
                ,       "mattermost": {<br>
                                "token": "{{ mattermost_token }}"<br>
                        ,       "channel": "ci"<br>
                        ,       "repo_base_url": "{{ repo_base_url }}"<br>
                        }<br>
                }<br>
<br>
What should I do?<br>
<br>
[1] <a href="https://github.com/shuLhan/mattermost-integration/blob/master/buildbot/mattermost.py" rel="noreferrer" target="_blank">https://github.com/shuLhan/mattermost-integration/blob/master/buildbot/mattermost.py</a><br>
[2] <a href="https://gist.github.com/shuLhan/0bdbe7e22c2df4bfc5b6d6c79ee282b6" rel="noreferrer" target="_blank">https://gist.github.com/shuLhan/0bdbe7e22c2df4bfc5b6d6c79ee282b6</a><br>
_______________________________________________<br>
users mailing list<br>
<a href="mailto:users@buildbot.net" target="_blank">users@buildbot.net</a><br>
<a href="https://lists.buildbot.net/mailman/listinfo/users" rel="noreferrer" target="_blank">https://lists.buildbot.net/mailman/listinfo/users</a><br>
</blockquote></div>