I would like to know is it possible to set a Github Webhook on Local Jenkins Server? Is there any Jenkins plugin to solve this kind of problem? Thanks.
Yes, it is possible , however you'll need to connect your local Jenkins server to the inte.net, using a tool like ngrok .
I have searched a lot to configure my local jenkins server
with Github Webhook
and finally with the help of serveo.net make it work by following below steps -
Open terminal and paste command: ssh -R 80:<localhost_with_port_number> serveo.net
eg ssh -R 80:127.0.0.1:8080 serveo.net
It will give you an accessible url -
Your local jenkins server will be accessible on given url -
Use this url in your webhook configuration -
Now your local jenkins server is ready to test any CICD activity...
Note: Each time it may generate a different url and in that case you have to update webhook configuration.
Happy learning!
In your Jenkins server, Go to “Manage Jenkins” -> “Manage Plugins” as shown below:
Search for GitHub plugin in the available list of plugins and install it, as shown below.
Next go to your GitHub project's settings, click the webhooks tab on the left as shown below and add the Jenkins GitHub plugin's webhook URL there.
Everytime, a Git pull or Git push event happens, GitHub will send a HTTP Post notification to your Jenkins server via the GitHub plugin.
You need a service like SocketXP to interconnect online GitHub or GitLab or Bitbucket project with your Jenkins server running in your local.network or in your private cloud.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.