I'm trying to setup Jenkins and Github such that Jenkins will build my project when something is pushed to Github. However, I can't seem to get the webhooks to work. I set the webhook on github to : http://localhost:8080/github-webhook/. I'm running the jenkins server on my laptop, therefore I am using 'localhost'. There might also be an error with this url, as github does say: 'Invalid host'?
I've tried to find some good guides, but none seem to be updated nor mention how to set it up locally. So any help would really be appreciated!
This cannot work. localhost maps to the IP address 127.0.0.1, which is just the same machine. So while you can access your local Jenkins installation via localhost, the GitHub server cannot.
You will either need a static IP address or you need to map a DNS entry to your dynamic IP (for example with http://www.dnsdynamic.org). And you need to open the port 8080 for external access. Only then will GitHub be able to reach your local instance with its webhook.