Hi, I'm struggling to get Github web hooks working as expected after 
following instructions here:

https://wiki.jenkins-ci.org/display/JENKINS/Github+Plugin#GitHubPlugin-Troubleshootinghooks

I'm trying to accomplish the following:

1. Build project per commit on any feature branch

2. Build target branch upon merge of a PR to that branch.

For my project:

I've set the branch specifier to "**" as I wish to build any branch which 
has been pushed/merged to.

I've set the "Github Project" and repository URL to the 
"[email protected]/<Orgname>/<reponame>.git per the instructions.

I've selected the "Build when a change is pushed to GitHub" option for the 
Build Trigger.

On github, I've added a new Webhook integration on the project settings 
page and set the payload URL to:

"http://<jenkins-user>:<jenkins-password>@<jenkins-root-url>/github-webhook/"

Once enabled, I can see 200 responses on payloads sent from Github to the 
Jenkins server. If I enable logging in the Jenkins "Manage Log" settings, I 
can see output indicating that Jenkins is receiving the web hook 
notification and "poking" the project. For example:

Received POST for https://github.com/<Orgname>/<reponame>

Nov 02, 2015 7:47:41 PM FINE 
org.jenkinsci.plugins.github.webhook.subscriber.DefaultPushGHEventSubscriber$1 
run

Considering to poke <job name>

Nov 02, 2015 7:47:41 PM INFO 
org.jenkinsci.plugins.github.webhook.subscriber.DefaultPushGHEventSubscriber$1 
run

Poked <job name>


Given this it seems like the basic communication is working. The problem is 
that I can only seem to trigger the build on Jenkins when I've deleted the 
workspace beforehand. For example, if on Github web hooks page, I resend a 
successful push notification payload to the Jenkins server, assuming the 
workspace has been populated, it will not trigger a run of the job. If I clear 
the workspace, and then repeat, then the job is triggered as expected. I've 
been pulling my hair out for a couple days trying to understand what I'm doing 
wrong or misunderstanding here and am stuck. 


If anyone has experience setting this up and can offer advice I'd greatly 
appreciate it.


Thanks,


Kris

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/76832f1f-9094-438a-9b61-82b958f52105%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to