Use HMAC secret for payload validation; set in GitHub and Jenkins 'Secret' field.
Ensure Jenkins can receive inbound connections from GitHub IPs (check firewall/whitelist).
Test webhook delivery from GitHub UI; inspect 'Recent Deliveries' for HTTP 200.
For Jenkins behind a reverse proxy, set proxy_pass with proxy_set_header Host $host;.
Use Jenkins Pipeline triggerOnPush and triggerOnPullRequest for fine-grained control.
Monitor webhook latency: if >10s, consider async processing or reduce payload size.
Always pin Jenkins and GitHub plugin versions; breaking changes happen.
✦ Definition~90s read
What is Jenkins GitHub Integration and Webhooks?
A GitHub webhook is a mechanism that sends HTTP POST requests to a specified URL (your Jenkins server) when certain events occur in a repository—like pushes, pull requests, or releases. Jenkins listens for these events via the 'GitHub Plugin' or 'GitHub Integration Plugin' and triggers corresponding pipelines.
★
Imagine you're a chef (Jenkins) waiting for orders from a delivery app (GitHub).
The webhook payload contains event details (commit messages, branch, PR number) that Jenkins uses to decide which job to run. For secure communication, GitHub can sign the payload with an HMAC SHA256 secret; Jenkins verifies the signature to ensure the request is authentic and hasn't been tampered with.
In production, you'll typically configure one webhook per repository pointing to your Jenkins master or a load balancer. The webhook URL must be exactly http://<jenkins-url>/github-webhook/ (note the trailing slash—a common gotcha). Jenkins then matches the event to a pipeline job based on the repository URL and branch filters.
Plain-English First
Imagine you're a chef (Jenkins) waiting for orders from a delivery app (GitHub). When a customer places an order (push), the app sends a notification to your kitchen's intercom (webhook). But if the intercom is unplugged or the app sends the order to the wrong address, you never start cooking. The webhook is that intercom message. A silent failure happens when the intercom rings but the line is too noisy—you hear a ping but can't understand the order. In tech terms, GitHub sends a POST with event data, but Jenkins fails to parse it or the network drops it. You think nothing happened, but the order is lost. That's why we add a 'secret handshake' (HMAC signature) to verify the message is real and log every intercom ping for troubleshooting.
⚙ Browser compatibility
Latest versions — ✓ supported
Chrome
Firefox
Safari
Edge
✓
✓
✓
✓
I still remember the Monday morning stand-up where our lead asked, 'Why hasn't the build run for the last 12 hours?' My stomach dropped. We had merged a critical fix on Friday, but no one noticed the CI pipeline was silent. The GitHub webhook was supposed to trigger Jenkins, but it didn't. We lost a full day of development time. That incident taught me that webhooks are the most overlooked single point of failure in CI/CD. Since then, I've debugged countless webhook issues—from missing trailing slashes to expired SSL certificates. In this guide, I'll share the exact configurations, debug commands, and war stories that will help you build a bulletproof Jenkins-GitHub webhook integration. No fluff, just production-hardened practices.
1. Prerequisites and Environment Setup
Before diving into webhook configuration, ensure your Jenkins environment meets the requirements. I recommend Jenkins 2.440.3 LTS (as of early 2025) with the 'GitHub Integration Plugin' version 576.v3e8cde6e0e9d or later. The classic 'GitHub Plugin' is deprecated but still works; however, the integration plugin provides better event handling and automatic webhook management. Your Jenkins instance must be accessible from the internet (or GitHub's IP ranges: 192.30.252.0/22, 185.199.108.0/22, 140.82.112.0/20, and 143.55.64.0/20). If behind a firewall, allow inbound HTTPS on port 443. For SSL, use a valid certificate from a trusted CA; self-signed certificates will cause GitHub to reject the webhook. Also, ensure your Jenkins has a public DNS name or static IP. I once used a dynamic DNS that resolved to different IPs, causing intermittent webhook failures. Finally, configure Jenkins global security: under 'Manage Jenkins' > 'Configure Global Security', ensure 'CSRF Protection' is enabled but not blocking webhooks (by default, the GitHub plugin bypasses CSRF for the webhook endpoint).
📊 Production Insight
Pin your plugin versions in a shared Jenkinsfile or configuration-as-code. We once had a plugin auto-update that changed the webhook payload parsing, breaking all pipelines.
🎯 Key Takeaway
Use Jenkins 2.440.3+ with GitHub Integration Plugin 576+. Ensure public HTTPS access with valid SSL.
thecodeforge.io
Jenkins Github Webhooks
2. Configuring the Webhook in GitHub
Navigate to your GitHub repository: Settings > Webhooks > Add webhook. The 'Payload URL' must be exactly https://jenkins.example.com/github-webhook/ (note the trailing slash—this is critical). For 'Content type', select application/json. The 'Secret' field is optional but highly recommended: generate a random string (e.g., openssl rand -hex 32) and paste it here. This secret will be used to sign the payload. Under 'Which events would you like to trigger this webhook?', choose 'Let me select individual events' and check: 'Pushes', 'Pull requests', and optionally 'Releases'. Avoid 'Send me everything' to reduce noise. Click 'Add webhook'. GitHub will immediately send a 'ping' event to verify the endpoint. Check 'Recent Deliveries' to see if the ping returned 200. If not, review the response body for errors. I once spent hours debugging a 404 only to realize I had typed github-webhook without the trailing slash. Also, ensure your Jenkins job has 'GitHub hook trigger for GITScm polling' enabled under Build Triggers. Without this, Jenkins ignores incoming webhook events for that job.
📊 Production Insight
Use a dedicated secret per repository. If one secret is compromised, you only need to update one webhook.
🎯 Key Takeaway
Payload URL must end with /. Enable 'GitHub hook trigger' in Jenkins job. Test with ping event.
3. Jenkins Plugin Configuration for Webhook Reception
Jenkins uses the 'GitHub Integration Plugin' to listen for webhooks. After installing the plugin, go to 'Manage Jenkins' > 'Configure System' and scroll to 'GitHub' section. Add a GitHub server with API endpoint https://api.github.com. For credentials, use a GitHub Personal Access Token (classic) with repo scope. This token allows Jenkins to validate webhook payloads and fetch repository metadata. Under 'Manage hooks', you can optionally let Jenkins auto-manage webhooks (not recommended for production—manual control is safer). The plugin registers a servlet at /github-webhook/ that receives POST requests. If you have multiple Jenkins masters behind a load balancer, ensure the webhook URL points to the active master or use a shared webhook proxy. For high availability, consider using a message queue (e.g., RabbitMQ) to decouple webhook reception from pipeline execution. In one incident, our master crashed during a webhook storm from a force push; the queue absorbed the load and replayed events after recovery.
📊 Production Insight
Set the GitHub API rate limit warning in Jenkins to alert when approaching limits. We hit the limit during a mass repository migration.
🎯 Key Takeaway
Use a PAT with repo scope. Avoid auto-managing webhooks in production. Consider a message queue for resilience.
thecodeforge.io
Jenkins Github Webhooks
4. Securing Webhooks with HMAC Verification
HMAC (Hash-based Message Authentication Code) ensures the webhook payload is from GitHub and hasn't been tampered with. When you set a secret in the GitHub webhook settings, GitHub computes an HMAC SHA256 signature of the payload using that secret and includes it in the X-Hub-Signature-256 header. Jenkins, with the same secret configured in the job or globally, computes the signature on the received payload and compares them. If they don't match, Jenkins rejects the webhook with a 401 status. To configure, in Jenkins job configuration, under 'Build Triggers', check 'GitHub hook trigger for GITScm polling' and then click 'Advanced...' to reveal 'Secret'. Paste the same secret you set in GitHub. Alternatively, you can set a global secret under 'Manage Jenkins' > 'Configure System' > 'GitHub Plugin' > 'Advanced' > 'Shared secret'. I prefer per-job secrets for granularity. Note: the HMAC verification only works if the payload is exactly as received (no proxy modifications). If you have a reverse proxy that modifies the body (e.g., adding whitespace), verification will fail. Ensure your proxy passes the body unmodified.
📊 Production Insight
Use different secrets for different repositories. Rotate secrets quarterly. Monitor Jenkins logs for HMAC mismatches.
🎯 Key Takeaway
HMAC verification prevents forged webhooks. Set secret in both GitHub and Jenkins. Ensure proxy doesn't modify payload.
5. Handling Webhooks Behind a Reverse Proxy
Most production Jenkins instances sit behind a reverse proxy (Nginx, Apache, or a cloud load balancer). The proxy must correctly forward the webhook POST requests to Jenkins. For Nginx, a typical configuration includes: `` location /github-webhook/ { proxy_pass http://jenkins-backend:8080/github-webhook/; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; } ` The proxy_pass must include the trailing slash to strip the location prefix. The Host header must be set to the original hostname; otherwise, Jenkins may generate incorrect redirects. Also, ensure the proxy does not buffer the request body (add proxy_request_buffering off;). I once debugged a case where the proxy buffered the body and modified the payload, causing HMAC verification to fail. Another common issue is SSL termination: if the proxy terminates SSL, the webhook URL should use HTTPS, but the proxy-to-Jenkins connection can be HTTP. However, GitHub's IP whitelist should include the proxy's public IP. For cloud load balancers (AWS ALB, GCP HTTP(S) LB), configure health checks on /github-webhook/` and ensure the target group points to the Jenkins port.
📊 Production Insight
Always set proxy_set_header Host $host; to preserve the original hostname. Without it, Jenkins may reject the webhook.
🎯 Key Takeaway
Reverse proxy must pass body unmodified and preserve Host header. Disable request buffering.
6. Troubleshooting Webhook Delivery Failures
When webhooks fail, start with GitHub's 'Recent Deliveries' (under webhook settings). It shows the HTTP response code, headers, and payload. A 200 means GitHub considers the delivery successful; but Jenkins may still ignore it. A 404 means the URL is wrong. A 500 means Jenkins encountered an error. If the delivery shows 'Failed to connect' or timeout, it's a network issue. Next, check Jenkins logs: tail -f /var/log/jenkins/jenkins.log | grep -i github-webhook. Look for 'Received POST' or 'Ignoring' messages. Common causes: missing trailing slash, incorrect secret, job not configured for GitHub trigger, or branch filter mismatch. Also, verify Jenkins can reach GitHub for API calls (e.g., to fetch repository metadata). Use curl -I https://api.github.com from the Jenkins server. If Jenkins is behind a corporate proxy, configure proxy settings in Jenkins. I once had a case where the corporate proxy was stripping the X-Hub-Signature-256 header, causing HMAC verification to fail silently. We had to add the proxy to the bypass list for the Jenkins server.
📊 Production Insight
Enable request logging in Jenkins by adding a log recorder for 'org.jenkinsci.plugins.github.webhook' at FINE level.
🎯 Key Takeaway
Always check GitHub 'Recent Deliveries' first. Then check Jenkins logs. Verify network connectivity and proxy settings.
7. Advanced Webhook Event Filtering with Pipeline Triggers
Jenkins Pipeline offers fine-grained control over which events trigger a build. The githubPush() trigger in a declarative pipeline will trigger on any push to any branch. To filter by branch, use branch('main') or branch('*'). For pull requests, use githubPullRequest() with optional filters like triggerPhrase('ok to test') or onlyTriggerIfNewCommits(). You can also combine triggers: triggers { githubPush(); githubPullRequest() }. For complex scenarios, use the Generic Webhook Trigger Plugin (GWT) which allows custom JSONPath filtering on the payload. For example, to trigger only on pushes to branches matching a regex, use GWT with jsonPath: '$.ref' and regexFilter: 'refs/heads/feature-.'. However, GWT bypasses the built-in GitHub plugin, so you lose HMAC verification. I use GWT only when the built-in triggers are insufficient. Another advanced technique: use the when directive to conditionally skip stages based on the event type (push vs PR).
📊 Production Insight
Avoid using cron triggers in addition to webhook triggers; they can cause duplicate builds. Stick to event-driven triggers.
🎯 Key Takeaway
Use githubPush() and githubPullRequest() for most cases. For custom filtering, use Generic Webhook Trigger Plugin with caution.
Large monorepos or active repositories can generate hundreds of webhook events per minute. Jenkins may struggle to process them all, leading to queue buildup and missed events. Solutions: 1) Use webhook filtering at GitHub level: only trigger on specific branches (e.g., main, develop). 2) Implement a webhook proxy that deduplicates and rate-limits events. For example, a simple Node.js service that aggregates pushes within a 5-second window and sends a single webhook to Jenkins. 3) Increase Jenkins executors and tune the thread pool for the webhook handler (via system properties: -Dhudson.model.Queue.threadPoolSize=50). 4) Use Jenkins Pipeline's quietPeriod to introduce a delay between trigger and build, allowing multiple commits to be batched. In one incident, a developer force-pushed 100 commits, each triggering a separate webhook. Jenkins spawned 100 builds, overwhelming the system. We implemented a 10-second quiet period and a webhook deduplicator that only forwarded the latest push per branch within a window.
📊 Production Insight
Set a global quiet period of 5 seconds in Jenkins to aggregate rapid pushes. This reduces build storms.
🎯 Key Takeaway
Use branch filtering, deduplication proxy, and quiet period to handle high-frequency webhooks.
9. Monitoring and Alerting for Webhook Health
Webhook failures are often silent. Implement monitoring: 1) Use the 'GitHub Webhook Plugin' which exposes metrics via Prometheus (if you have the Prometheus plugin). 2) Create a synthetic health check: a cron job that pushes to a test repository and verifies a build is triggered within 5 minutes. 3) Monitor Jenkins logs for errors: grep -c 'ERROR.*webhook' /var/log/jenkins/jenkins.log and alert if count > 0. 4) Use GitHub's API to check webhook status: GET /repos/{owner}/{repo}/hooks/{hook_id} returns last_response with status code and message. I have a Lambda function that checks all webhooks every hour and alerts if the last response was not 200. 5) Set up a dashboard in Grafana showing webhook delivery rate, latency, and error rate. In our production environment, we had a PagerDuty alert for any webhook that returned 500 or timed out for more than 5 minutes.
📊 Production Insight
Don't rely solely on GitHub's 'Recent Deliveries' for monitoring; it only shows the last 50 deliveries. Use API for historical data.
🎯 Key Takeaway
Implement synthetic monitoring, log alerting, and GitHub API checks to detect webhook failures early.
10. Migrating from Classic GitHub Plugin to GitHub Integration Plugin
The classic 'GitHub Plugin' (org.jenkins-ci.plugins:github) is deprecated in favor of the 'GitHub Integration Plugin' (org.jenkins-ci.plugins:github-integration). The integration plugin provides better event handling, automatic webhook management, and support for check runs. To migrate: 1) Install the GitHub Integration Plugin and remove the classic plugin. 2) Update your Jenkins jobs: in job configuration, under 'Build Triggers', uncheck 'GitHub hook trigger for GITScm polling' and check 'GitHub hook trigger' (the new one). 3) Update your Jenkinsfiles: replace githubPush() with the new syntax (same name, but behavior may differ). 4) Reconfigure webhooks in GitHub: the integration plugin uses a different endpoint (/github-webhook/ is the same, but the payload handling changed). I migrated 200 jobs in one weekend; the biggest issue was that the new plugin expects the repository URL to be in a specific format (e.g., https://github.com/owner/repo.git). Some jobs had SSH URLs which caused matching failures. After migration, test with a sample push.
📊 Production Insight
Before migration, take a snapshot of all job configurations. Use the Jenkins API to export configs for rollback.
🎯 Key Takeaway
Migrate to GitHub Integration Plugin for better support. Update job triggers and repository URLs.
11. Webhook Security Best Practices
Beyond HMAC, secure your webhook pipeline: 1) Use HTTPS only; never expose Jenkins over HTTP. 2) Restrict GitHub webhook IPs at the firewall level (192.30.252.0/22, 185.199.108.0/22, 140.82.112.0/20, 143.55.64.0/20). 3) Use a dedicated Jenkins user with minimal permissions for the PAT. 4) Rotate secrets and PATs regularly (every 90 days). 5) Audit webhook configurations: periodically review which repositories have webhooks pointing to your Jenkins. 6) Consider using GitHub Apps instead of webhooks for more granular permissions and lower latency. GitHub Apps use webhooks but with a different authentication mechanism (JWT). However, they require more setup. 7) Protect your Jenkins from replay attacks: the GitHub webhook payload includes a timestamp; you can verify it's within 5 minutes. The GitHub Integration Plugin does this automatically. 8) Never log the raw payload in plain text; it may contain tokens or secrets. Use sanitized logging.
📊 Production Insight
Implement IP whitelisting for GitHub's webhook IPs. We once had a DDoS attack that hit our Jenkins webhook endpoint; IP whitelisting mitigated it.
🎯 Key Takeaway
Use HTTPS, IP whitelisting, PAT rotation, and payload timestamp validation. Consider GitHub Apps for advanced security.
12. Real-World Incident: The Case of the Silent PR
We had a production incident where pull request webhooks stopped triggering builds for a specific repository. The webhook delivery showed 200 OK, Jenkins logs showed 'Received POST for repository owner/repo', but no build was triggered. We assumed the job configuration was correct because it worked for pushes. After hours of debugging, we discovered that the job had a branch filter set to 'main' only. PRs from feature branches were filtered out. The fix: remove the branch filter or set it to '**' for PR triggers. However, we wanted to build PRs only from forked repositories? That required a different approach: use the 'GitHub Pull Request Builder Plugin' (ghprb) which has its own webhook handling. We ended up using ghprb for PR builds and the built-in GitHub trigger for pushes. This incident taught me to always check branch filters and understand the difference between push and PR triggers. Also, add a test: create a dummy PR and verify it triggers a build.
📊 Production Insight
Always test both push and PR events separately. Use a test repository with a simple pipeline to validate webhook behavior.
🎯 Key Takeaway
Branch filters apply to both push and PR triggers. Use '**' to allow all branches for PRs, or use ghprb plugin.
● Production incidentPOST-MORTEMseverity: high
The Silent Merge: How a Missing Trailing Slash Broke Our CI
Symptom
No builds triggered after push events. GitHub 'Recent Deliveries' showed 200 OK responses but Jenkins logs showed no incoming requests.
Assumption
Network connectivity issue or firewall blocking GitHub IPs.
Root cause
The webhook URL was configured as http://jenkins.example.com/github-webhook without the trailing slash. GitHub sent requests to that URL, but Jenkins' webhook listener only responds to .../github-webhook/. The 200 OK was from a default handler, not Jenkins.
Fix
Added trailing slash to webhook URL in GitHub repository settings: http://jenkins.example.com/github-webhook/.
Key lesson
Always double-check the exact URL format required by Jenkins.
Use curl -v to test the webhook endpoint and inspect the response body.
Jenkins Github Webhooks: Feature Comparison
feature
classic_plugin
integration_plugin
generic_webhook_plugin
Webhook URL format
http://jenkins/github-webhook/
http://jenkins/github-webhook/
http://jenkins/generic-webhook-trigger/invoke
HMAC verification
Supported via job secret
Supported via job or global secret
Not built-in; requires custom token
Event filtering
Basic (push only)
Push, PR, release
Any event via JSONPath
Automatic webhook management
No
Yes (optional)
No
Support for check runs
No
Yes
No
Best for
Legacy setups, simple push triggers
Modern pipelines, PR builds
Complex event filtering, non-GitHub sources
📦 Downloadable Quick Reference
Print-friendly master reference covering all topics in this track.
Always enable HMAC secret verification to prevent forged webhooks.
3
Use GitHub Integration Plugin (not classic) for modern pipeline support.
4
Test webhook delivery via GitHub 'Recent Deliveries' and Jenkins logs.
5
Implement quiet period and deduplication for high-frequency repositories.
6
Monitor webhook health with synthetic checks and GitHub API alerts.
7
Reverse proxy must pass body unmodified and preserve Host header.
8
Branch filters apply to both push and PR triggers; use ** for all branches.
Common mistakes to avoid
6 patterns
×
Missing trailing slash in webhook URL
Symptom
Webhook delivery shows 200 OK but no build triggered
Fix
Ensure URL ends with /github-webhook/
×
Not enabling 'GitHub hook trigger' in job
Symptom
Webhook delivered but build not triggered
Fix
Check 'GitHub hook trigger for GITScm polling' in job configuration
×
Using HTTP instead of HTTPS
Symptom
Webhook delivery fails with 'Connection refused' or 'Invalid HTTP response'
Fix
Change webhook URL to HTTPS and ensure Jenkins has valid SSL certificate
×
Incorrect HMAC secret (mismatch between GitHub and Jenkins)
Symptom
Webhook delivery shows 401 Unauthorized
Fix
Regenerate secret and update both GitHub and Jenkins with the same value
×
Branch filter too restrictive for PR triggers
Symptom
PRs from branches other than main don't trigger builds
Fix
Set branch specifier to ** or remove branch filter for PR triggers
×
Reverse proxy modifying payload or headers
Symptom
HMAC verification fails intermittently
Fix
Disable proxy buffering and ensure body is passed unmodified
INTERVIEW PREP · PRACTICE MODE
Interview Questions on This Topic
Q01SENIOR
How does Jenkins verify the authenticity of a GitHub webhook?
Q02JUNIOR
What is the correct webhook URL format for Jenkins?
Q03SENIOR
How would you troubleshoot a webhook that shows 200 OK in GitHub but doe...
Q04JUNIOR
What are the IP ranges that GitHub uses to send webhooks?
Q05SENIOR
How can you handle a high volume of webhook events to prevent build stor...
Q06SENIOR
Explain the difference between the classic GitHub Plugin and the GitHub ...
Q07JUNIOR
What could cause a webhook to return 404 from Jenkins?
Q08SENIOR
How do you secure a Jenkins webhook endpoint?
Q01 of 08SENIOR
How does Jenkins verify the authenticity of a GitHub webhook?
ANSWER
Jenkins uses HMAC SHA256 verification. GitHub signs the payload with a secret using HMAC-SHA256 and includes the signature in the X-Hub-Signature-256 header. Jenkins computes the signature on the received payload using the same secret and compares them. If they match, the webhook is considered authentic.
Q02 of 08JUNIOR
What is the correct webhook URL format for Jenkins?
ANSWER
The URL must be http://<jenkins-url>/github-webhook/ with a trailing slash. Without the trailing slash, Jenkins may return a 200 OK but not process the webhook.
Q03 of 08SENIOR
How would you troubleshoot a webhook that shows 200 OK in GitHub but doesn't trigger a build?
ANSWER
First, check Jenkins logs for 'Received POST' messages. Verify the job has 'GitHub hook trigger' enabled. Check branch filters. Ensure the webhook URL ends with a trailing slash. Test with a manual curl POST to the webhook endpoint.
Q04 of 08JUNIOR
What are the IP ranges that GitHub uses to send webhooks?
ANSWER
GitHub's webhook IP ranges are: 192.30.252.0/22, 185.199.108.0/22, 140.82.112.0/20, and 143.55.64.0/20. These can be obtained from https://api.github.com/meta.
Q05 of 08SENIOR
How can you handle a high volume of webhook events to prevent build storms?
ANSWER
Use branch filtering at GitHub level, implement a deduplication proxy, set a quiet period in Jenkins (e.g., 5 seconds), or use a message queue to buffer events.
Q06 of 08SENIOR
Explain the difference between the classic GitHub Plugin and the GitHub Integration Plugin.
ANSWER
The classic plugin is deprecated and only supports push events. The integration plugin supports push, pull request, and release events, offers automatic webhook management, and supports check runs. The integration plugin also has better payload handling.
Q07 of 08JUNIOR
What could cause a webhook to return 404 from Jenkins?
ANSWER
The most common cause is an incorrect URL path. Ensure the URL is exactly /github-webhook/ (case-sensitive). Also, if Jenkins is behind a reverse proxy, the proxy may not be forwarding to the correct path.
Q08 of 08SENIOR
How do you secure a Jenkins webhook endpoint?
ANSWER
Use HTTPS, set an HMAC secret, whitelist GitHub IP ranges, use a reverse proxy for additional security, and regularly rotate secrets. Also, consider using GitHub Apps for more granular permissions.
01
How does Jenkins verify the authenticity of a GitHub webhook?
SENIOR
02
What is the correct webhook URL format for Jenkins?
JUNIOR
03
How would you troubleshoot a webhook that shows 200 OK in GitHub but doesn't trigger a build?
SENIOR
04
What are the IP ranges that GitHub uses to send webhooks?
JUNIOR
05
How can you handle a high volume of webhook events to prevent build storms?
SENIOR
06
Explain the difference between the classic GitHub Plugin and the GitHub Integration Plugin.
SENIOR
07
What could cause a webhook to return 404 from Jenkins?
JUNIOR
08
How do you secure a Jenkins webhook endpoint?
SENIOR
FAQ · 8 QUESTIONS
Frequently Asked Questions
01
Why is my webhook showing 200 OK but no build is triggered?
Most common cause: missing trailing slash in URL. Also check that the job has 'GitHub hook trigger' enabled and branch filters are not blocking the event.
Was this helpful?
02
How do I get the HMAC secret for Jenkins?
Generate a random string using openssl rand -hex 32. Paste it in GitHub webhook settings under 'Secret' and in Jenkins job configuration under 'Build Triggers' > 'Advanced' > 'Secret'.
Was this helpful?
03
Can I use the same webhook for multiple Jenkins jobs?
Yes, a single webhook can trigger multiple jobs if they are configured with the same repository URL. Jenkins will match the incoming event to all jobs that have the trigger enabled and matching branch filters.
Was this helpful?
04
What is the difference between 'GitHub hook trigger for GITScm polling' and 'GitHub hook trigger'?
The first is from the classic plugin and uses polling as a fallback. The second is from the integration plugin and is purely event-driven. Use the integration plugin's trigger for better reliability.
Was this helpful?
05
How do I test a webhook locally without pushing to GitHub?
Use curl to send a POST request to your Jenkins webhook URL with a sample payload. You can also use ngrok to expose your local Jenkins to the internet and configure GitHub to send webhooks to the ngrok URL.
Was this helpful?
06
My webhook works for pushes but not pull requests. Why?
Ensure the webhook is configured to send 'Pull request' events. Also, check that the Jenkins job has the PR trigger enabled (e.g., githubPullRequest()) and branch filters are not excluding the PR source branch.
Was this helpful?
07
How do I view Jenkins webhook logs?
Check /var/log/jenkins/jenkins.log and grep for 'github-webhook'. You can also add a log recorder for org.jenkinsci.plugins.github.webhook at FINE level for more detail.
Was this helpful?
08
Is it safe to expose Jenkins webhook endpoint to the internet?
Yes, if you use HTTPS, HMAC secret, IP whitelisting, and keep Jenkins up to date. The webhook endpoint is designed to be public. However, always use additional security measures like a reverse proxy.