[users at bb.net] Bitbucket status reporter in 0.9

Chris Spencer chrisspen at gmail.com
Thu Feb 16 17:30:22 UTC 2017


You're right, that was the problem. And the build statuses show under the
"Activity" tab on the pull request page. Thanks.

On Thu, Feb 16, 2017 at 12:03 PM, Pierre Tardy <tardyp at gmail.com> wrote:

> Hi Chris,
>
> I am not sure there are many bitbucket users right there. There is a
> possibility of a bug, or a change of api by bitbucket.
> Actually buildbot is expecting code 201 from bitbucket:
> https://github.com/buildbot/buildbot/blob/master/master/
> buildbot/reporters/bitbucket.py#L96
>
> You may want to try to change this line to
>
> if response.code not in (200, 201):
>
>
> Le jeu. 16 févr. 2017 à 17:16, Chris Spencer <chrisspen at gmail.com> a
> écrit :
>
>> I've tried enabling the BitbucketStatusPush with:
>>
>>     from buildbot.reporters.bitbucket import BitbucketStatusPush
>>     bs = BitbucketStatusPush(BITBUCKET_OATH_KEY, BITBUCKET_OATH_SECRET)
>>     c['services'].append(bs)
>>
>> and even though I enabled an Oauth consumer in my Bitbucket account, as
>> explained in the docs, nothing shows up in Bitbucket.
>>
>> Twistd.log shows the confusing error:
>>
>>     2017-02-16 16:03:02+0000 [-] 200: unable to upload Bitbucket status
>> {"key": "myproject_runtests", "name": "myproject_runtests", "repository":
>> {"links": {"self": {"href": "https://api.bitbucket.org/2.
>> 0/repositories/myproject/myproject"}, "html": {"href": "
>> https://bitbucket.org/myproject/myproject"}, "avatar": {"href": "
>> https://bitbucket.org/myproject/myproject/avatar/32/"}}, "type":
>> "repository", "name": "myproject", "full_name": "myproject/myproject",
>> "uuid": "{1e98c979-a6d6-48d5-9b59-8b6ffc130a60}"}, "url": "
>> http://buildbot.myproject.com/#builders/1/builds/7", "links": {"commit":
>> {"href": "https://api.bitbucket.org/2.0/repositories/myproject/
>> myproject/commit/6d0012a30f6a5d4b3f1b4a64853cd4181cceee88"}, "self":
>> {"href": "https://api.bitbucket.org/2.0/repositories/myproject/
>> myproject/commit/7d0139a20f5a5d4b3f1b4c64853cd4181cceee88/statuses/build/
>> myproject_runtests"}}, "refname": null, "state": "SUCCESSFUL",
>> "created_on": "2017-02-16T16:02:02.432495+00:00", "updated_on":
>> "2017-02-16T16:03:02.232617+00:00", "type": "build", "description": ""}
>>
>> What's going on here? Why is it "unable to upload status", but the JSON
>> doesn't mention any error? How do I get an explanation for the upload
>> error? Is there anyway to test this from the command line to confirm the
>> settings are correct?
>>
>> On Wed, Feb 15, 2017 at 5:51 PM, Chris Spencer <chrisspen at gmail.com>
>> wrote:
>>
>> I had written a custom status reporter for publishing the build results
>> to any open pull requests linked to the build's branch.
>>
>> After I upgraded to 0.9, this naturally stopped working, but I noticed
>> that 0.9 now has a BitbucketStatusPush class (http://docs.buildbot.net/
>> latest/manual/cfg-reporters.html#bitbucketstatuspush).
>>
>> However, it's unclear what this does. It says status is "published to a
>> specific commit SHA". What does that mean in terms of the Bitbucket UI?
>> Does that status show up in any outstanding pull requests, or does it show
>> somewhere else?
>>
>>
>> _______________________________________________
>> users mailing list
>> users at buildbot.net
>> https://lists.buildbot.net/mailman/listinfo/users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.buildbot.net/pipermail/users/attachments/20170216/61c2465a/attachment.html>


More information about the users mailing list