- How to make GitHub (and/or GitHub Enterprise) triggers Multibranch Pipeline in Jenkins.
- CloudBees Jenkins Enterprise - Managed Master (CJEMM)
- CloudBees Jenkins Team (CJT)
- CloudBees Jenkins Platform - Client Master (CJPCM)
- DEV@cloud (D@C)
- Jenkins LTS
A. Plugin Configuration
For GitHub Branch Source in case you wish to integrate with a GitHub Enterprise, it needs to be added in Manage Jenkins > Configure System > GitHub Enterprise Servers in order to fetch repositories from that endpoint.
B. Job Configuration
Create a Multibranch Pipeline job/item with the following considerations:
- Branch Sources >
Add source> GitHub Select the API endpoint
Owneruse the organization
- Select on of the fetched
- For Credential use
Username and Password, typing as password the personal API Token.
- Since SCM API 2.2.4 Behaviors section > Make sure
Filter by nameis removed unless you only want to discover a subset of branches. If it is configured make sure to include
PR-*to Discover Pull Requests.
Suppress Automatic SCM trigger property: It disables any automatic triggering, not only coming from push / pull request / repository notification but also from branch indexing.
After saving the job, two views area created: one for
Push events) and another for
C. Validate GitHub WebHook
Make sure post-receive hooks has been created on GitHub at the Repository specify in the SCM configuration of the job as follows:
If the post-receive hooks are not there, please review Troubleshooting
Tested products/plugins version
The latest update of this article has been tested with: