DEV Community

Alex Spinov
Alex Spinov

Posted on

Bitbucket Has Free Private Repos With Built-in CI/CD — Git Hosting That Speaks Jira

Bitbucket Has Free Private Repos With Built-in CI/CD — Git Hosting That Speaks Jira

GitHub is the default. GitLab is the alternative. But if your team already lives in Jira and Confluence, Bitbucket connects everything without plugins or workarounds.

Bitbucket is Atlassian's git hosting platform. It integrates natively with Jira (auto-link commits to tickets), Confluence (embed repo info in docs), and Trello.

Free Tier

  • Unlimited private repos
  • Up to 5 users
  • Bitbucket Pipelines — 50 build minutes/month
  • Pull request reviews
  • Branch permissions
  • Jira integration built in

Jira Integration — The Killer Feature

# Include Jira ticket ID in branch name
git checkout -b feature/PROJ-123-add-user-auth

# Include in commit message
git commit -m "PROJ-123: Add JWT authentication middleware"

# Bitbucket automatically:
# 1. Links the commit to Jira ticket PROJ-123
# 2. Transitions ticket status (e.g., "In Progress" → "In Review")
# 3. Shows commit details in Jira ticket sidebar
# 4. Shows Jira ticket details in Bitbucket PR
Enter fullscreen mode Exit fullscreen mode

Bitbucket Pipelines (Built-in CI/CD)

# bitbucket-pipelines.yml
image: node:18

pipelines:
  default:
    - step:
        name: Test
        caches:
          - node
        script:
          - npm ci
          - npm test
          - npm run lint

  branches:
    main:
      - step:
          name: Test & Build
          script:
            - npm ci
            - npm test
            - npm run build
          artifacts:
            - dist/**
      - step:
          name: Deploy
          deployment: production
          script:
            - pipe: atlassian/scp-deploy:1.4.0
              variables:
                USER: deploy
                SERVER: production.example.com
                REMOTE_PATH: /var/www/app
                LOCAL_PATH: dist
Enter fullscreen mode Exit fullscreen mode

REST API

// List repositories
const response = await fetch(
  'https://api.bitbucket.org/2.0/repositories/my-workspace',
  {
    headers: {
      'Authorization': `Bearer ${accessToken}`
    }
  }
);
const repos = await response.json();

// Create a pull request
await fetch(
  'https://api.bitbucket.org/2.0/repositories/my-workspace/my-repo/pullrequests',
  {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${accessToken}`,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      title: 'PROJ-123: Add user authentication',
      source: { branch: { name: 'feature/PROJ-123-add-user-auth' } },
      destination: { branch: { name: 'main' } }
    })
  }
);
Enter fullscreen mode Exit fullscreen mode

The Bottom Line

If your team uses Jira, Bitbucket makes the git→ticket connection seamless. The free tier with 5 users and CI/CD is enough for small teams.


Need to monitor repositories, track code changes across competitors, or build automated development pipelines? I create custom solutions.

📧 Email me: spinov001@gmail.com
🔧 My tools: Apify Store

Top comments (0)