buildbot_travis
buildbot_travis copied to clipboard
cannot work after install and config in GitHub EE
Followed this https://medium.com/buildbot/using-hyper-sh-to-deploy-your-buildbot-126888e1164d I config this by webUI, set number of local workers to 8, then generate tokens, webhook (push and PR), set payload URL, then delivery payload, github EE show me 200, success
My .travis.yml
:
script:
- echo 'test CI'
then, when I push to this repo, github EE webhooks show me 500, failed
This is twistd.log
:
2018-01-08 15:24:52+0800 [_GenericHTTPChannelProtocol,39,10.200.55.139] X-GitHub-Event: push
2018-01-08 15:24:52+0800 [_GenericHTTPChannelProtocol,39,10.200.55.139] New revision: 21126b0f
2018-01-08 15:24:52+0800 [_GenericHTTPChannelProtocol,39,10.200.55.139] adding changes from web hook
Traceback (most recent call last):
File "/Users/xxx/BuildBot/bb-travis/sandbox/lib/python3.6/site-packages/buildbot/www/hooks/github.py", line 334, in getChanges
return self.handler.process(request)
File "/Users/xxx/BuildBot/bb-travis/sandbox/lib/python3.6/site-packages/twisted/internet/defer.py", line 1532, in unwindGenerator
return _inlineCallbacks(None, gen, Deferred())
File "/Users/xxx/BuildBot/bb-travis/sandbox/lib/python3.6/site-packages/twisted/internet/defer.py", line 1386, in _inlineCallbacks
result = g.send(result)
File "/Users/xxx/BuildBot/bb-travis/sandbox/lib/python3.6/site-packages/buildbot/www/hooks/github.py", line 89, in process
result = yield defer.maybeDeferred(lambda: handler(payload, event_type))
--- <exception caught here> ---
File "/Users/xxx/BuildBot/bb-travis/sandbox/lib/python3.6/site-packages/twisted/internet/defer.py", line 150, in maybeDeferred
result = f(*args, **kw)
File "/Users/xxx/BuildBot/bb-travis/sandbox/lib/python3.6/site-packages/buildbot/www/hooks/github.py", line 89, in <lambda>
result = yield defer.maybeDeferred(lambda: handler(payload, event_type))
File "/Users/xxx/BuildBot/bb-travis/sandbox/lib/python3.6/site-packages/buildbot/www/hooks/github.py", line 149, in handle_push
event, properties)
File "/Users/xxx/BuildBot/bb-travis/sandbox/lib/python3.6/site-packages/buildbot/www/hooks/github.py", line 287, in _process_change
change['codebase'] = self._codebase(payload)
File "/Users/xxx/BuildBot/bb-travis/sandbox/lib/python3.6/site-packages/buildbot_travis/vcs/github.py", line 28, in getCodebaseForGitHubChange
return getCodebaseForRepository(payload['repository']['html_url'])
File "/Users/xxx/BuildBot/bb-travis/sandbox/lib/python3.6/site-packages/buildbot_travis/vcs/base.py", line 178, in getCodebaseForRepository
return repository_db_by_url[url].name
builtins.KeyError: u'<my_repo_url>'
But when I force build it, builder will block, can only show preparing worker
. And I cannot stop this builder.
Do I missing some steps?
~~Another python3 compatible problem?~~
Test in python2, force build works, but when push(I can not test PR event), GitHub EE repo webhook still show 500, failed
, twistd.log
same as above.
@tardyp After reading doc and source code, I think I need set github_api_endpoint
to proper value, but sorry for that I am a newbie in python, can you provide a configuration detail?
After change all api.github.com
to <github_ee_instance_host_url>/api/v3
in buildbot repo, install master from source, same error as above. DB is empty?
Solved. Source code use payload['repository']['html_url']
, but I just use the url in Clone with HTTPS which contains .git
.
Finally, Am I need set github_api_endpoint
? If yes, how to set?
Thx.