Github Webhook on Local Jenkins Server

Viewed 7912

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.

3 Answers

I have searched a lot to configure my local jenkins server with Github Webhookand finally with the help of serveo.net make it work by following below steps -

  1. Open terminal and paste command: ssh -R 80:<localhost_with_port_number> serveo.net

    e.g. ssh -R 80:127.0.0.1:8080 serveo.net

  2. It will give you an accessible url -

    enter image description here

  3. Your local jenkins server will be accessible on given url -

    enter image description here

  4. Use this url in your webhook configuration -

    enter image description here

    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: enter image description here

Search for GitHub plugin in the available list of plugins and install it, as shown below.

enter image description here

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.

enter image description here

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.

Related