Question

I'm having an issue setting up Github and Jenkins CI.

When a forked PR commits changes, github doesn't notify jenkins, even if I've accepted the PR from a forked repo. Only when I merge a pr from a forked repo into master will github trigger Jenkins.

So the credentials and ability is there, but I can't find the option in github to force ALL commits to the original repo (including forked pr's) trigger the CI, anybody any suggestions?

Was it helpful?

Solution

The solution was to use the Github Pull Request Builder Plugin

There are instructions in the link above that worked for me. As well as the default instructions I had to also do this:

"This build is parameterized" and add string parameter named "sha1". When starting build give the "sha1" parameter commit id you want to build or refname (eg: "origin/pr/9/head").

and I didn't use github hooks

OTHER TIPS

A post-receive hook in GitHub would post to any listening service any received commit.
It isn't limited to a particular branch.

However, Jenkins can be set to monitor a specific branch.
Unless, as mentioned in "How can I make Jenkins CI with git trigger on pushes to master?", you configure your Jenkins CI to Poll from GitHub (in which case, it will listen to said Github hook, instead of doing a git pull on a specific branch.
The GitHub pull request builder plugin mentioned by the OP Coombesy 's answer is one other way to make Jenkins poll GitHub.

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