Bitbucket: concetti chiave, Pipelines e capacità

Autore: IT Sectr Pubblicato: 2026-05-09 Tempo di lettura: 8 min

Bitbucket is a Git platform from Atlassian, integrated with Jira, Confluence, and other ecosystem tools. Bitbucket provides Git repository hosting, built-in CI/CD through Bitbucket Pipelines, and powerful code review tools. According to Atlassian, 2024, Bitbucket è utilizzato da oltre 10 milioni di sviluppatori e 800.000 team in tutto il mondo.

Punti chiave

  • Bitbucket è una piattaforma Git di Atlassian con integrazione profonda in Jira e Confluence per la gestione dei progetti.
  • Bitbucket Pipelines è un CI/CD integrato con configurazione YAML e supporto per container Docker.
  • Pull Request con code review include commenti inline, controlli e approvazioni obbligatorie.
  • Bitbucket Cloud è la versione SaaS, Data Center è auto-ospitato per clienti aziendali.
  • Integrazione Jira collega automaticamente commit e PR alle attività tramite chiavi nei messaggi.

Cos'è Bitbucket?

Bitbucket is a web platform for hosting Git repositories, developed by Atlassian. Originally, Bitbucket only supported Mercurial (since 2008), but after shutting down Mercurial support in 2020, it fully switched to Git. The platform is available in two editions: Bitbucket Cloud (SaaS, Atlassian hosting) and Bitbucket Data Center (self-hosted version for Enterprise).

The main advantage of Bitbucket over competitors is its deep integration with Atlassian products. Jira automatically links commits and Pull Requests to tasks, Confluence allows embedding code snippets in documentation, and Opsgenie connects deployments with incidents. For teams already using the Atlassian ecosystem, Bitbucket is a natural choice as it requires no additional integration setup.

Bitbucket Cloud offers several hosting tiers. The free plan includes one user and limited storage (1 GB). The standard plan is $3 per user per month with unlimited private repositories and 2,500 Pipelines minutes per month. Bitbucket uses a per-user licensing model: each user who has access to a repository is billed, including read-only users.

Bitbucket Pipelines: CI/CD pronto all'uso

Bitbucket Pipelines is a built-in CI/CD system that runs on Docker containers. Pipelines is directly integrated into Bitbucket Cloud and does not require installing separate runners or configuring webhooks. The configuration is described in a bitbucket-pipelines.yml file located in the repository root. Each pipeline consists of steps combined into sequences.

Pipelines supports parallel steps, manual triggers, push and schedule triggers, dependency caching, and artifacts. Each step runs in an isolated Docker container, whose image is specified in the configuration. Below is an example pipeline for building an Android application with testing and publishing to Firebase App Distribution:

yaml
# bitbucket-pipelines.yml
image: openjdk:17-jdk

pipelines:
  pull-requests:
    '**':
      - step:
          name: Build and Test
          caches:
            - gradle
          script:
            - ./gradlew assembleDebug testDebugUnitTest
          artifacts:
            - app/build/outputs/apk/debug/

  branches:
    main:
      - step:
          name: Deploy to Firebase
          script:
            - pipe: atlassian/firebase-distribution:1.0.0
              variables:
                APP_FILE: 'app/build/outputs/apk/debug/app-debug.apk'

Bitbucket Pipelines has a 50-minute limit per pipeline for the Cloud version, which is sufficient for most projects but may be a bottleneck for large monorepositories. For Data Center, the limit is completely removed — pipeline duration is only determined by available server resources. Pipelines also supports custom Docker images, allowing the use of any build and testing tools.

Pull Request e code review in Bitbucket

Pull Request in Bitbucket is designed with a focus on enterprise code review processes. Bitbucket offers: inline comments on specific diff lines, mandatory checks from Pipelines or external services, minimum number of approvals for merging, merge blocking until all checks pass, and conflict of interest declaration (decline). The PR interface is split into three columns: source code, diff, and file structure.

A unique Bitbucket feature is Code Insights. This is an API for integrating external code quality tools (SonarQube, CodeScene, ESLint, Detekt) that display their results directly in the Pull Request interface. A developer can see: the number of new bugs, test coverage, code smells, and duplications. Code Insights allows merge decisions based on objective metrics rather than just the reviewer’s subjective opinion.

Bitbucket also supports branch permissions: you can prevent branch deletion, require PR creation for specific branches, and limit the list of users who have merge rights to the main branch. Additionally, there are merge checks — a list of mandatory conditions (Pipelines passed, minimum N approvals, no unresolved comments) that must be satisfied before the Merge button is available. These settings protect the production branch from accidental unverified changes.

Integrazione di Bitbucket con Jira e Confluence

Bitbucket integration with Jira is a key advantage of the platform. When a developer includes a task key in a commit message (e.g., PROJ-123), Jira automatically links that commit to the task. The task interface displays a Development tab containing all commits, Pull Requests, branches, and deployments related to that task. PRs automatically update the task status in Jira upon merge (transition to Done).

Confluence also integrates with Bitbucket: you can embed live code snippets from the repository into Confluence pages using the Code Block macro. Changes in the code are automatically synced with Confluence, which is convenient for maintaining architectural documentation. Additionally, Atlassian provides Smart Commits — managing Jira tasks directly from commit messages: status transitions, time logging, and priority changes.

For DevOps automation, Bitbucket supports Deployment Gates — linking deployment to task status. When a pipeline reaches the deployment stage, Jira checks whether all tasks in the release have an Approved status. If not — the deployment is blocked. This implements the Continuous Delivery principle with quality control at the task level, not just code level.

Repository templates

Bitbucket allows creating repository templates to standardize project structures. For mobile projects, you can create a template with pre-configured files: Gradle configuration, gitignore, Detekt and Ktlint settings, Android CI pipeline, and a README with build instructions. A new project can be created from the template in a few clicks, which accelerates onboarding for new developers.

Bitbucket vs GitHub e GitLab

Comparing Bitbucket with GitHub and GitLab depends on the ecosystem the team operates in. Bitbucket lags behind GitHub in community size (10 million vs 100 million users) but wins in enterprise integrations thanks to the Atlassian stack. If a team already uses Jira for task management and Confluence for documentation, Bitbucket provides seamless integration without additional setup.

In terms of CI/CD, Bitbucket Pipelines falls short of GitLab CI/CD in advanced scenarios (no child pipelines, matrix builds, multi-level pipelines) and GitHub Actions in the number of ready-made actions (Marketplace Actions has 20,000+ steps vs thousands of public pipes in Bitbucket). However, Pipelines is easier to configure for common scenarios thanks to ready-made pipe components from Atlassian.

CriterionBitbucketGitHubGitLab
CI/CDPipelines, 50 min/stepActions, 2000 min/monthCI/CD, no limits (Self)
IntegrationJira, ConfluenceCopilot, Slack, AzureKubernetes, Prometheus
Self-HostedData Center (paid)Enterprise ServerCE (free)
Users~10 million~100 million~30 million
LicenseProprietaryProprietaryMIT (open source)

Choosing Bitbucket is justified in two scenarios: the team already uses the Atlassian ecosystem (Jira + Confluence + Opsgenie) or operates in a corporate environment where Bitbucket Data Center is already deployed as a standard tool. For startups and open-source projects, GitHub offers a richer community and free features, while GitLab offers the best self-hosted CI/CD.

Bitbucket Data Center per le aziende

Bitbucket Data Center is the enterprise version of the platform, designed for installation on your own infrastructure. Unlike the Cloud version, Data Center offers: clustering (active-active mode for multiple nodes), Smart Mirroring (geo-distributed mirrors for faster clone/fetch), high availability (99.99% uptime with clustering), and full action auditing.

Data Center includes all features of the Cloud version, but with enterprise extensions. Smart Mirroring automatically synchronizes repositories between servers in different data centers — developers from Europe and Asia get the same clone/fetch speed since Git operations are performed through the nearest mirror. Audit logs record every action: who, when, and from which IP created a branch, made a push, or merged a PR.

Bitbucket Data Center licensing is based on user count (not repositories). The minimum license is for 50 users starting at $1,520 per year (standard tier). Data Center is mandatory for organizations where: availability SLAs are required, data cannot leave the country (GDPR, 152-FZ), the number of developers exceeds 500, or integration with a corporate LDAP/SAML system is needed.

Bitbucket Snippets for shared code

Bitbucket Snippets is a tool for storing and sharing small code fragments. Unlike repositories, Snippets do not have a full Git history but support versioning, comments, and forks. Snippets are useful for shared configurations (docker-compose.yml for local development), SQL migration scripts, and code examples that do not require a full repository. Each Snippet has a unique URL and can be linked to a Jira project.

Bitbucket API for automation

Bitbucket REST API 2.0 allows programmatic management of repositories, Pull Requests, branches, and permissions. The API is used for workflow automation: creating a repository from a template, bulk updating permissions, retrieving Pull Request statistics, and integrating with external CI systems. The rate limit is 1,000 requests per hour for authenticated users. The API supports Pagination through Page and Pagelen parameters for working with large datasets.

Domande frequenti

What is Bitbucket and why do I need it?

Bitbucket is an Atlassian platform for storing Git code with CI/CD, code review, and built-in Jira integration. It is used by teams that already work in the Atlassian ecosystem.

How is Bitbucket Pipelines different from GitHub Actions?

Pipelines uses pipe components (ready-made steps from Atlassian), making it easier for typical tasks. GitHub Actions offers a wider Marketplace and flexible matrix builds, but requires more configuration.

How much does Bitbucket cost for a small team?

For a team of 5 people, Bitbucket Cloud Standard costs $15 per month ($3 per user). The free plan is only available for one user with limited functionality.

How do I migrate a repository from GitHub to Bitbucket?

Bitbucket provides a built-in importer from GitHub, GitLab, and other platforms. In the interface, select Import repository, enter the URL and authentication details — all commits and branches will be transferred.

What is Bitbucket Data Center?

Data Center is the enterprise version of Bitbucket for installation on your own servers with clustering, Smart Mirroring, and auditing. Suitable for organizations with hundreds of developers and data security requirements.

Riepilogo

  • Bitbucket is an Atlassian Git platform focused on enterprise integrations and code review.
  • Pipelines is a built-in CI/CD on Docker containers with ready-made pipe components from Atlassian.
  • Jira integration automatically links commits and PRs with tasks, updating statuses upon merge.
  • Code Insights displays results from external code analyzers directly in the Pull Request interface.
  • Data Center is a self-hosted Enterprise version with clustering, Smart Mirroring, and full auditing.
  • Bitbucket is optimal for teams already using Jira and Confluence in a corporate environment.
  • Inizia by creating a repository, connecting Pipelines, and configuring Code Insights — this covers the team’s core needs.

Svilupperemo un'applicazione mobile chiavi in mano

IT Sectr crea applicazioni iOS e Android per startup e aziende dal 2017. Ti consulteremo e ti proporremo la soluzione migliore.

Discuti il progetto

Leggi anche