You can automatically trigger build jobs on a Jenkins server when pushes are made to a repository in your GitHub Enterprise instance.
- Install the Jenkins GitHub plugin on your Jenkins server.
GitHub Enterprise configuration
- Sign into GitHub Enterprise with your personal user account.
- Navigate to the repository you want to connect to your Jenkins build server.
- In the right sidebar, click Settings.
- In the left sidebar, click Webhooks & Services.
- In the Services box, click Add service.
- Select "Jenkins (GitHub plugin)".
- In the Jenkins hook URL field, type the URL of your Jenkins server's webhook endpoint. This is where your GitHub Enterprise instance will send JSON payloads when a push is made.
- Click Add service.