I have taken these steps:
But no build is triggered on Jenkins. The GitHub Hook Log says: "Polling has not run yet.". How can I make it "start"? How can I further debug this?
EDIT: I have not added a GitHub Server in Manage Jenkins -> Configure -> GitHub since I ran into issue with the authentication (but that would be a different question). Is this required for github webhooks?
EDIT2: I figured out how to add a GitHub API to the Jenkins config (using Personal Access Token with git hook access enabled). But it doesn't seem to make a difference.
I found how to fix it properly.
First. set Jenkins logger at Jenkins manage > system log
add log recoder, with this configuration
hudson.plugins.git.GitStatus - All
com.cloudbees.jenkins.GitHubWebHook - All
org.jenkinsci.plugins.github - All
Second. Hook trigger again.
and check logger again. In my case, the logger says
Skipped {ProjectName} because it doesn't have a matching repository.
Third. Check the webhook url where the webhook request exactly came from.
it will be specified at logger like this:
Received PushEvent for https://github.com/{username}/{reponame} from {ip} ⇒ http://{your jenkins url}/github-webhook/
Fourth. Again go to jenkins project configuration,
check whole github urls are exactly same as https://github.com/{username}/{reponame} at step 3.
No .git at last.
I hope this answer helps you. Thank you
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