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
To attach a file to an issue or pull request conversation, drag and drop it into the comment box. Alternatively, you can click the bar at the bottom of the comment box to browse, select, and add a file from your computer.
Step 1: go to your GitHub repository and click on 'Settings'. Step 2: Click on Webhooks and then click on 'Add webhook'. Step 3: In the 'Payload URL' field, paste your Jenkins environment URL. At the end of this URL add /github-webhook/.
For Jenkins to receive PR events through the pull request plugin, you need to add the Jenkins pull request builder payload URL in the Github repository settings. If you need just the PR triggers, you can select the “Let me select individual events” option and select just the “Pull requests” option.
After looking at Jenkins LOGS I learned a few things :
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With