Problem :
I am working on a CI setup to configure github - Jenkins web hook for triggering builds with code commits on github. Below are the current configuration details
Jenkins job works perfectly with the manual build. But it does not work (automatic build trigger) when a code commit is done on the github.
Need Help on:
I'll expand cody.codes comment given this one has sat idle for a while. You can configure a webhook payload delivery service such as smee.io which will intercept the webhooks that GitHub fires.
This Jenkins article outlines the setup instructions in detail, but the simplified overview is:
Jenkins only makes an outbound connection in this setup (which is required to subscribe to your Smee channel) so your Jenkins server can remain behind your firewall.
After spending some hectic hours, I have got it to a working state. Below is just a summary of what I have done:
Payload URL - http://jenkinsIP:port/github-webhook/ Content type - application/x-www-form-urlencoded Secret - none Which events would you like to trigger this webhook? - Just the push event Active > Add webhook
You can check commit a change into the github and github shall send a POST request to your jenkins server which will trigger the build. You can check the logs in Recent Deliveries section.
If this same can be done for a private jenkins server like using port forwarding, or any other way. Please update.
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