[Buildbot-devel] Trouble wiring up a web hook change source.

Kenneth Baltrinic kenneth at baltrinic.com
Sat May 4 05:57:12 UTC 2013


I am new to BuildBot but I have it up and running and successfully building
and deploying code from a BitBucktet Repo.  Presently I am using the
GitPoller to trigger builds but want to use a web hook.  It seems I am
close to having this working but not quite.  So far i have

1) configured BitBuckets POST service (See
https://confluence.atlassian.com/display/BITBUCKET/POST+Service+Management)
2) downloaded and installed the bitbucket.py web hook from this pull
request: https://github.com/buildbot/buildbot/pull/643
3) reconfigured myWebStatus like so:

c['status'].append(html.WebStatus(
    http_port=8010,
    authz=authz_cfg,
    change_hook_dialects={ 'bitbucket' : True }))


But is seems to me that there ought to be one more step, i.e. setting up a
change-source to connect the received notifications with the appropriate
schedulers.  I cannot find any docs on how to do this.

My testing seems to confirm that such a step is missing.  When I push to my
repo, I immediately see the following in my twisted.log, but it never kicks
off a build... Any ideas?


 2013-05-04 01:24:58-0400 [HTTPChannel,3,63.246.22.222] Received POST from
Bitbucket: {'payload': ['{"repository": {"website": "", "fork": false,
"name": "my-repo", "scm": "git", "owner": "my-company", "absolute_url":
"/my-company/my-repo/", "slug": "my-repo", "is_private": true}, "user":
"kbaltrinic", "truncated": false, "commits": [{"node": "93b1ce913790",
"files": [{"type": "modified", "file": "infrastructure/master.cfg"}],
"branch": "master", "utctimestamp": "2013-05-04 05:35:23+00:00",
"timestamp": "2013-05-04 07:35:23", "raw_node":
"93b1ce91379033b3e18eb73fa225004e2a6e3e71", "message": "Added web
changehook to config.\\n", "size": -1, "author": "kbaltrinic", "parents":
["ac4a69f33287"], "raw_author": "Kenneth Baltrinic <kenneth at baltrinic.com>",
"revision": null}], "canon_url": "https://bitbucket.org"}']}
2013-05-04 01:24:58-0400 [HTTPChannel,3,63.246.22.222] New revision:
93b1ce913790
2013-05-04 01:24:58-0400 [HTTPChannel,3,63.246.22.222] Received 1 changes
from bitbucket
2013-05-04 01:24:58-0400 [HTTPChannel,3,63.246.22.222] Got the following
changes [{'files': [u'infrastructure/master.cfg'], 'repository': u'
https://bitbucket.org/my-company/my-repo/', 'who': u'Kenneth Baltrinic <
kenneth at baltrinic.com>', 'when': 1367645723, 'comments': u'Added web
changehook to config.\n', 'project': '', 'branch': u'master', 'revlink': u'
https://bitbucket.org/my-company/my-repo/93b1ce91379033b3e18eb73fa225004e2a6e3e71',
'revision': u'93b1ce91379033b3e18eb73fa225004e2a6e3e71'}]
2013-05-04 01:24:58-0400 [HTTPChannel,3,63.246.22.222] Payload: {'payload':
['{"repository": {"website": "", "fork": false, "name": "my-repo", "scm":
"git", "owner": "my-company", "absolute_url": "/my-company/my-repo/",
"slug": "my-repo", "is_private": true}, "user": "kbaltrinic", "truncated":
false, "commits": [{"node": "93b1ce913790", "files": [{"type": "modified",
"file": "infrastructure/master.cfg"}], "branch": "master", "utctimestamp":
"2013-05-04 05:35:23+00:00", "timestamp": "2013-05-04 07:35:23",
"raw_node": "93b1ce91379033b3e18eb73fa225004e2a6e3e71", "message": "Added
web changehook to config.\\n", "size": -1, "author": "kbaltrinic",
"parents": ["ac4a69f33287"], "raw_author": "Kenneth Baltrinic <
kenneth at baltrinic.com>", "revision": null}], "canon_url": "
https://bitbucket.org"}']}
2013-05-04 01:24:58-0400 [HTTPChannel,3,63.246.22.222] WARNING: change
source is using deprecated addChange parameter 'who'
2013-05-04 01:24:58-0400 [HTTPChannel,3,63.246.22.222] WARNING: change
source is using deprecated addChange parameter 'when'
2013-05-04 01:24:58-0400 [HTTPChannel,3,63.246.22.222] checking for User
Object from git Change for: Kenneth Baltrinic <kenneth at baltrinic.com>
2013-05-04 01:24:58-0400 [-] added change
Change(revision=u'93b1ce91379033b3e18eb73fa225004e2a6e3e71', who=u'Kenneth
Baltrinic <kenneth at baltrinic.com>', branch=u'master', comments=u'Added web
changehook to config.\n', when=1367645723, category=None, project=u'',
repository=u'https://bitbucket.org/my-company/my-repo/') to database
2013-05-04 01:24:58-0400 [-] injected change
Change(revision=u'93b1ce91379033b3e18eb73fa225004e2a6e3e71', who=u'Kenneth
Baltrinic <kenneth at baltrinic.com>', branch=u'master', comments=u'Added web
changehook to config.\n', when=1367645723, category=None, project=u'',
repository=u'https://bitbucket.org/my-company/my-repo/')
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://buildbot.net/pipermail/devel/attachments/20130504/e42b1f7f/attachment.html>


More information about the devel mailing list