Date: 2024-10-27 07:52:59
Score: 1.5
Natty:
- Install "Multibranch Scan Webhook Trigger" plugin in Jenkins via Manage Jenkins -> Plugins.
- Configure the multi-branch pipeline: In Configuration, under 'Scan Multibranch Pipeline Triggers', select 'Scan by webhook' and specify a token name e.g. githubtoken.
- Go to your project in Github and under settings, click on 'Webhooks' and then 'Add webhook'. Specify payload URL in format JENKINS_URL/multibranch-webhook-trigger/invoke?token=[Trigger token] e.g. http://61.158.61.122:8080/multibranch-webhook-trigger/invoke?token=githubtoken and select content type as 'application/json'. Click on 'Add webhook'.
- Test this by making a change in the branch and verify that build is triggered in Jenkins for that particular branch in multi-branch pipeline.
Reasons:
- Long answer (-0.5):
- No code block (0.5):
- Contains question mark (0.5):
- Low reputation (1):
Posted by: Irshad Nizami