Docker

Webhooks Configuration Notes

By Utility Zone · 2026-02-19T10:52:45.698764

(Jenkins + Bitbucket + Jira)


1. Overview

Webhooks enable automatic communication between systems. In a CI/CD pipeline:

Developer Push → Bitbucket → Webhook → Jenkins → Build Triggered


2. Bitbucket → Jenkins Webhook Configuration

Step 1: Install Required Plugins in Jenkins

Go to: Manage Jenkins → Manage Plugins

Install: - Git Plugin - Bitbucket Plugin - Bitbucket Branch Source Plugin

Restart Jenkins after installation.


Step 2: Create a Pipeline Job

  1. New Item → Multibranch Pipeline
  2. Add Source → Select Bitbucket
  3. Provide repository URL and credentials
  4. Save configuration

Step 3: Configure Webhook in Bitbucket

  1. Open repository
  2. Repository Settings → Webhooks
  3. Click Add Webhook

Webhook URL:

http://your-jenkins-url/bitbucket-hook/

Recommended (secure):

https://your-jenkins-url/bitbucket-hook/


Step 4: Select Events

Enable: - Repository Push - Pull Request Created - Pull Request Updated

Save configuration.


Step 5: Test the Webhook

Push code to repository. Verify Jenkins build is triggered automatically.


3. Jira → Jenkins Webhook (Optional)

Used when triggering builds based on issue updates.

In Jira: Settings → System → Webhooks → Add Webhook

Example URL:

https://your-jenkins-url/generic-webhook-trigger/invoke?token=abc123

Events: - Issue Created - Issue Updated - Issue Transitioned


4. Security Best Practices

  • Use HTTPS
  • Enable webhook secret/token validation
  • Restrict access via firewall or security groups
  • Use API tokens instead of passwords
  • Place Jenkins behind reverse proxy (NGINX recommended)

5. Common Troubleshooting

403 Forbidden → Check authentication
Webhook not triggering → Verify URL and logs
SSL error → Use valid certificate
Connection refused → Check firewall/security group


6. Enterprise Architecture Flow

Bitbucket → Webhook → Jenkins → Build Agent → Deployment


End of Notes