Bitbucket Pipelines Generator
Generate production-ready `bitbucket-pipelines.yml` with branch pipelines, PR triggers, and docker services.
Understanding Bitbucket Pipelines configuration
What is bitbucket-pipelines.yml?
Bitbucket Pipelines is an integrated CI/CD service built into Bitbucket. It allows you to automatically build, test, and deploy your code based on a configuration file in your repository named bitbucket-pipelines.yml.
Pipeline Types
Bitbucket Pipelines uses a rigid structure to define when specific steps run. You can configure multiple types of pipelines:
default): Runs on every push to the repository, unless a branch-specific pipeline is defined.branches): Specific pipelines that only run when changes are pushed to a matching branch (e.g., main, feature/*).pull-requests): Run only when a Pull Request is created or updated.custom): Can only be triggered manually through the Bitbucket UI or via the API. Useful for production deployments.Key Concepts
#
Images
Pipelines run inside Docker containers. You can define a global image at the top level of the file, or you can override it on a per-step basis.
node:18 or python:3.10-alpine#
Steps
A pipeline is composed of a list of steps. Each step runs in a separate Docker container, meaning they do not share state unless you explicitly configure artifacts and caches.
node_modules between runs.#
Services
If your tests require a database or a cache (like PostgreSQL or Redis), you can define them as services. Bitbucket will spin them up alongside your build container.
docker service.