Github plugin can be used to receive push notifications that can trigger a Jenkins job.
Install Github plugin
- Open Jenkins home page and Login as Admin (if security is enabled)
- Click manage Jenkins
- Click Configure Jenkins
- Go to Manage Plugins link on left side
- Select Github plugin from available plugins
- Click Download and Install
- Restart Jenkins
Configuration of Github project in a Jenkins job
- Open Jenkins home page
- Select the job
- Click Configure link on left side
- Inside Source code management section, Enter URL of Github projecthttp://github.com/username/project
- For authentication, provide username / password in advanced... options.
Receiving the push notifications from GitHub
- Open Jenkins home page and Login as Admin (if security is enabled)
- Click manage Jenkins
- Click Configure System
- In Github Web hook section, select auto-manage hook URLs
OR - In Github Web hook section, select Manually manage hook URLs
- Go to Github project page
- In Service Hooks tab, select Post-Receive URLs hook
- Add URL <root_URL_of_Jenkins>/github-webhook
- Open Jenkins home page
- Select the job
- Click Configure link on left side
- Select Build when a change is pushed to GitHub and Save.
No comments:
Post a Comment
Note: only a member of this blog may post a comment.