Docker

Jenkins + Bitbucket + Jira Integration Notes

By Utility Zone · 2026-02-19T10:43:25.056098

Overview

This document explains how Jenkins integrates with Bitbucket and Jira in a CI/CD pipeline.


1. Jenkins (CI/CD Automation)

Jenkins is an automation server used to: - Build applications - Run automated tests - Deploy applications - Integrate with external systems

Typical pipeline stages: 1. Checkout Code 2. Build 3. Test 4. Package 5. Deploy 6. Notify Jira


2. Bitbucket (Source Code Management)

Bitbucket is a Git repository hosting platform.

Role in architecture: - Stores application source code - Manages branches and pull requests - Triggers Jenkins builds using webhooks

Webhook flow: Developer Push → Bitbucket → Webhook → Jenkins


3. Jira (Issue Tracking & Traceability)

Jira is used for: - Tracking user stories, tasks, and bugs - Linking commits and builds to issues - Monitoring release progress

Smart Commit example:

PROJ-101 Fixed login bug PROJ-101 #comment Code completed PROJ-101 #transition Done


4. End-to-End CI/CD Workflow

  1. Jira ticket created (e.g., PROJ-101)
  2. Developer creates branch feature/PROJ-101
  3. Code pushed to Bitbucket
  4. Webhook triggers Jenkins
  5. Jenkins builds and tests application
  6. Deployment executed (if configured)
  7. Build status sent back to Bitbucket
  8. Jira ticket updated with build information

5. Integration Points

Bitbucket → Jenkins: Webhook
Jenkins → Bitbucket: Build Status API
Jenkins → Jira: REST API
Jira ↔ Bitbucket: Application Link


6. Required Jenkins Plugins

  • Git Plugin
  • Bitbucket Plugin
  • Bitbucket Branch Source Plugin
  • Pipeline Plugin
  • Jira Plugin

7. Best Practices

  • Use API tokens instead of passwords
  • Store secrets in Jenkins Credentials Manager
  • Use Multibranch Pipelines
  • Maintain Jenkinsfile in repository
  • Enable HTTPS for all integrations

8. Sample Jenkinsfile

pipeline {
    agent any

    stages {
        stage('Checkout') {
            steps {
                checkout scm
            }
        }
        stage('Build') {
            steps {
                sh 'mvn clean install'
            }
        }
        stage('Test') {
            steps {
                sh 'mvn test'
            }
        }
    }
}

9. Summary Architecture

Jira → Bitbucket → Jenkins → Deployment Environment → Users


End of Notes