I am trying to integrate GitHub with Jenkins to run my Selenium Automation Project. Here is what I have done till now.
- Created new Freestyle Project in Jenkins
- Selected GitHub Project and added repository url under 'GitHub project'
- Selected 'Git' as source code management and entered url copied from clone address in 'Repository URL' field
- Selected 'GitHub hook trigger for GITScm polling' as build trigger
- Added 'top level maven target' as build step under 'BUILD'
Went back to web GitHub
- Went to Settings tab of respective repository
- Under Webhooks, clicked 'add webhook' and entered 'Payload URL' as 'http://{my machine ip}:8080/github-webhook/'
- Went back to source code tab and edited text.
In this case, I expected my jenkins build to get triggered but nothing happened. When checked webhooks, there is red error icon with note 'Last Delivery was not successful. Couldn't connect to server'
If I try to build same project directly from Jenkins, it works fine.
Can anyone help me out?