Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

webhook received, build happens with cron but not when "Use github hooks for build triggering" is checked #260

Closed
nricklin opened this issue Feb 3, 2016 · 16 comments

Comments

@nricklin
Copy link

nricklin commented Feb 3, 2016

I've got a job that works when "Use github hooks for build triggering" is NOT checked, but I'd like it to build in real-time, not periodically.

When I check "Use github hooks for build triggering", here's the org.jenkinsci.plugins.ghprb log at resolution FINEST:

Feb 02, 2016 5:15:28 PM INFO org.jenkinsci.plugins.ghprb.GhprbTrigger stop
Stopping the ghprb trigger for project testmodule1_pull_request
Feb 02, 2016 5:15:28 PM FINE org.jenkinsci.plugins.ghprb.GhprbTrigger
Removing [org/testmodule1] from webhooks repo [testmodule1_pull_request]
Feb 02, 2016 5:15:28 PM INFO org.jenkinsci.plugins.ghprb.GhprbTrigger start
Starting the ghprb trigger for the testmodule1_pull_request job; newInstance is true
Feb 02, 2016 5:15:28 PM FINE org.jenkinsci.plugins.ghprb.GhprbTrigger
Adding [testmodule1_pull_request] to webhooks repo [org/testmodule1]
Feb 02, 2016 5:15:28 PM FINE org.jenkinsci.plugins.ghprb.GhprbTrigger
Adding project to current repo set, length: 0
Feb 02, 2016 5:16:51 PM FINE org.jenkinsci.plugins.ghprb.GhprbRootAction
Got payload event: pull_request
Feb 02, 2016 5:16:51 PM INFO org.jenkinsci.plugins.ghprb.GhprbRootAction doIndex
Checking PR #5 for org/testmodule1
Feb 02, 2016 5:16:51 PM FINE org.jenkinsci.plugins.ghprb.GhprbTrigger
Retrieving triggers for repo [org/testmodule1]
Feb 02, 2016 5:18:00 PM FINE org.jenkinsci.plugins.ghprb.GhprbTrigger
Use webHooks is set, so not running trigger

Any ideas?

Thanks!

@ezralanglois
Copy link

Same issue here:

Starting the ghprb trigger for the XXX job; newInstance is true
Feb 04, 2016 9:55:11 AM INFO org.jenkinsci.plugins.ghprb.GhprbRootAction doIndex
Checking PR #72 for XXX/XX
Checking issue comment 'test this please.' for repo XXX/XX
Feb 04, 2016 10:06:02 AM INFO org.jenkinsci.plugins.ghprb.GhprbRootAction doIndex
Checking issue comment 'add to whitelist' for repo XXX/XX
Feb 04, 2016 10:06:53 AM INFO org.jenkinsci.plugins.ghprb.GhprbRootAction doIndex
Checking issue comment 'Can one of the admins verify this patch?' for repo XXX/XX

@DavidTanner
Copy link
Contributor

Webhooks have been a bit in churn lately, what version of the plugin are you using?

@nricklin
Copy link
Author

nricklin commented Feb 4, 2016

I'm using version 1.30.

I unchecked and re-checked lots of boxes and it magically started working.

@ezralanglois
Copy link

I tried unchecking and rechecking boxes, just now, and it did not work for me. Instead, I just created a new project and the new project works. I don't see any difference between the projects.

@ezralanglois
Copy link

Also, awesome plugin!

@ezralanglois
Copy link

Same with version 1.30

@DavidTanner
Copy link
Contributor

Make sure to update to 1.30.1, there is a major bug in 1.30. In the meantime I will see if I can debug it. Can you send me a copy of your config.xml?

gjacquet pushed a commit to gjacquet/ghprb-plugin that referenced this issue Feb 25, 2016
@reportingsjr
Copy link

I'm having the same issue. I updated and it worked fine on my test repo so I switched to the production repo. I get the exact same log where it says it is ignoring the trigger because webhooks are set up.

Using version 1.33.1. I can send you my config.xml if you can tell me where to find it!

@reportingsjr
Copy link

I found the config.xml for the jobs that work/don't work. It is the exact same between them. I'm guessing the difference is that I created one before updating the ghprb plugin and one after. I don't if I can figured out what version was installed previously.

Here it is:
https://gist.github.com/reportingsjr/72a72731eb7570999a552a6e2e973551

@reportingsjr
Copy link

Ok, I take back what I said about it being different on a job created before I upgraded vs after.

If I change the github repo to https://github.com/reportingsjr/kicad-library it works on either job. If I change it to https://github.com/kicad/kicad-library it says the "skipping triggers" bit. I tried looking through the code and I'm lost as to why that on its own would cause a difference.

@DavidTanner
Copy link
Contributor

Are you sure the job you are creating has permissions to the new repo?

@reportingsjr
Copy link

I'm using the same token and the webhooks for both have the exact same permissions.

@DavidTanner
Copy link
Contributor

Have you checked the logs in github to see that the webhook is sent for that repo?

@reportingsjr
Copy link

Indeed I have. Github sends effectively the same json to the jenkins server and jenkins sends back the same response to each (200 OK).

@wangqr
Copy link

wangqr commented Oct 15, 2017

Same here with version 1.39.0. Everything works fine on personal repo. But for org repo the log stops at Retrieving triggers for repo [org/repo].

@bjoernhaeuser
Copy link
Contributor

I am closing this for now.

@wangqr if this still happens for you please create a new issue with updated logs. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants