ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Possible to have buildfarm status in PR on Github?

asked 2020-09-08 05:22:50 -0500

rreignier gravatar image

updated 2020-09-09 03:16:03 -0500

I have configured bloom to enable Pull Request testing on the buildfarm.

On the Github side, giving admin access to the whole org seems a bit too much, so I am using the alternative solution using webhook, as described here in the wiki.

On a PR, a build is triggered on the buildfarm, but no feedback is given on the Github PR page.

Is this behavior normal while using webhook, or am I missing a configuration somewhere?

Edit: here are the permissions I have given: (a bit more that what is advised on the Wiki). But I have just noticed that the Pull request review comments is missing. image description

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2020-11-16 03:36:33 -0500

rreignier gravatar image

The solution for me was to give ros-pull-request-builder write access to the specific repo. Without granting access to the whole organization: image description

edit flag offensive delete link more

answered 2020-09-08 16:19:40 -0500

tfoote gravatar image

updated 2020-09-09 01:54:27 -0500

gvdhoorn gravatar image

From the console output of your job I see that you're getting permission denied from github (see log snippet below). I think that you have not given enough privileges for the webook to write the PR status back to your repository.

01:42:02 Setting status of 5e8c461ac29ae9919d6fd9e52ab33993f7a39a57 to SUCCESS with url and message: 'Build finished. '
01:42:02 Using context: Npr__ixblue_ins_stdbin_driver__ubuntu_focal_amd64
01:42:03 FileNotFoundException means that the credentials Jenkins is using is probably wrong. Or the user account does not have write access to the repo.
01:42:03 org.kohsuke.github.GHFileNotFoundException: {"message":"Not Found","documentation_url":""}
01:42:03    at org.kohsuke.github.Requester.handleApiError(
01:42:03    at org.kohsuke.github.Requester._to(
01:42:03    at
01:42:03    at org.kohsuke.github.GHRepository.createCommitStatus(
01:42:03    at org.jenkinsci.plugins.ghprb.extensions.status.GhprbSimpleStatus.createCommitStatus(
01:42:03    at org.jenkinsci.plugins.ghprb.extensions.status.GhprbSimpleStatus.onBuildComplete(
01:42:03    at org.jenkinsci.plugins.ghprb.GhprbBuilds.onCompleted(
01:42:03    at org.jenkinsci.plugins.ghprb.GhprbBuildListener.onCompleted(
01:42:03    at hudson.model.listeners.RunListener.fireCompleted(
01:42:03    at hudson.model.Run.execute(
01:42:03    at
01:42:03    at hudson.model.ResourceController.execute(
01:42:03    at
01:42:03 Caused by:
01:42:03    at sun.reflect.GeneratedConstructorAccessor63895.newInstance(Unknown Source)
01:42:03    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(
01:42:03    at java.lang.reflect.Constructor.newInstance(
01:42:03    at$
01:42:03    at$
01:42:03    at Method)
01:42:03    at
01:42:03    at
01:42:03    at
01:42:03    at
01:42:03    at org.kohsuke.github.Requester.parse(
01:42:03    at org.kohsuke.github.Requester.parse(
01:42:03    at org.kohsuke.github.Requester._to(
01:42:03    ... 11 more
01:42:03 Caused by:
01:42:03    at
01:42:03    at ...
edit flag offensive delete link more


Thank you. But even with Pull request review comments activated, I still have the permission error. Do you have any idea which permission I should enable in the screenshot I have added to my answer?

rreignier gravatar image rreignier  ( 2020-09-09 03:31:18 -0500 )edit

Maybe the Statuses choice can grant access.

rreignier gravatar image rreignier  ( 2020-09-09 07:22:07 -0500 )edit

Sadly, no...

rreignier gravatar image rreignier  ( 2020-09-09 07:30:09 -0500 )edit

In order to install the webhook the admin or maintain permissions must be applied. Once the hook is installed in your repository you can revoke the permission but if the hook ever needs to update you won't receive the update.

nuclearsandwich gravatar image nuclearsandwich  ( 2020-12-18 13:36:32 -0500 )edit

Question Tools



Asked: 2020-09-08 05:22:50 -0500

Seen: 441 times

Last updated: Nov 16 '20