Question

I have configured the Jenkins Github Pull-Request builder plugin to build every pull-request made by members of my institution. It works like a charm.

However, the build is not reporting the build status back to github like it shows in this nice post. I also tried checking the box to "Use comments to report results when updating commit status fails", but still I get nothing back on github.

I have created a bot user on GitHub and given it push and administrative rights to the repo.

My Jenkins server is behind a firewall, but since it is building normally and detecting changes (by polling) to the github repo, I assume this is not the issue.

Anyone else had this issue? How did you solve it?

Here is a dump of my console output (compressed for readability)

Started by an SCM change
Building in workspace 
Fetching changes from the remote Git repository
Fetching upstream changes from repo
Seen branch in repository origin/HEAD
Seen branch in repository origin/master
Seen branch in repository origin/pr/1/head
Seen branch in repository origin/pr/1/merge
Seen branch in repository origin/pr/10/head
[…]
Seen branch in repository origin/pr/9/head
Seen branch in repository origin/pr/9/merge
Seen 33 remote branches
Checking out Revision 9b4d45ee3a2d265a1268c2931e7b2bcb738e1c87 (origin/pr/16/merge)
First time build. Skipping changelog.
...found 160 targets...
...updating 21 targets...
**passed** test/bin/test.test/gcc-4.8.1/debug/test.test
[xUnit] [INFO] - Starting to record.
[xUnit] [INFO] - Processing BoostTest-1.x (default)
[xUnit] [INFO] - Check 'Failed Tests' threshold.
[xUnit] [INFO] - Check 'Skipped Tests' threshold.
[xUnit] [INFO] - Setting the build status to SUCCESS
[xUnit] [INFO] - Stopping recording.
Finished: SUCCESS
Was it helpful?

Solution

After looking at Jenkins LOGS I learned a few things :

  1. This plugin (github pull-request builder) fully replaces all the other build-triggers (including git and SCM poll). I was using all three, and when I thought this plugin was working because it was building correctly, was actually the other triggers.
  2. You must set your project github URL on the github plugin. This plugin depends on the github plugin to work. This is what was preventing it from working in my configuration.

After you fix #2, you can remove the triggers from SCM Poll and Git to make sure the pull-request plugin is triggering the build. When it does, it actually adds a link to the pull request to the activity feed in Jenkins (very nice) and updates the status on github correctly.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top