A Jenkins Server Click here for helparrow-up-right
A GitHub repository Click here for helparrow-up-right
Log into the Jenkins.
Create a new job
Job Name: WebhookTestJob
WebhookTestJob
Source code management
Git URL: get URL herearrow-up-right
Build Triggers
Enable: GitHub hook trigger for GITScm polling
GitHub hook trigger for GITScm polling
Build
Click Add Build Step → Invoke Top Level Maven Targets
Add Build Step
Invoke Top Level Maven Targets
Maven Version: Maven
Maven
Goals: clean install
clean install
On your GitHub repository:
Go to Settings → Webhooks
Settings
Webhooks
Add a webhook:
Payload URL: http://<Jenkins_IP>:8080/github-webhook/
http://<Jenkins_IP>:8080/github-webhook/
Content type: application/json
application/json
Update the repository (push a new commit). This should trigger the Jenkins job via the webhook.