DevTools Logo

Bitbucket Pipelines Generator

Bitbucket Pipelines Generator

Assemble a valid bitbucket-pipelines.yml with caches, services and deployments.

Runs in your browser
Try an example

Pipeline editor

no branch
Caches

bitbucket-pipelines.yml

1 error

No pipeline configured yet

Load an example or fill in the editor to generate bitbucket-pipelines.yml.

Examples

Node caching

Input
image node:20, branch main, script npm ci
Output
caches:
  - node_modules

The custom node_modules cache is defined once and referenced by the step.

Manual production deploy

Input
deployment production, manual on
Output
deployment: production
trigger: manual

Both keys belong to the same step; deployment steps should be last.

Feature branch

Input
branch feature/api
Output
"feature/api":

A slash in a branch name forces the YAML key to be quoted.

About this tool

Bitbucket Pipelines Generator assembles a complete bitbucket-pipelines.yml from a small guided form. It covers the global image, definitions for caches and services, clone depth, branch or default pipelines, step scripts, artifacts, timeouts and manual deployment environments.

The emitter handles the syntax details that usually cause Bitbucket Cloud rejections: custom caches live under definitions.caches, built-in cache names such as node and node_modules are recognized, branch names with slashes are quoted, and script lines containing colons or comment markers are quoted before they can be misparsed.

Validation runs as you edit. Undefined cache or service references, empty scripts, duplicate pipeline names, out-of-range max-time values and token-like literals are reported with the exact field that needs attention. Everything runs in your browser tab; repository variables are referenced as $VAR and secrets are never inlined.

What this tool does not do

  • Bitbucket Cloud only; Data Center/Server pipelines are out of scope.
  • Import understands the subset emitted by this tool; unrecognized keys are reported and dropped.
  • Runner pools and repository variable creation are not configured here.
  • Platform limits change; verify the current step size table against Atlassian documentation.

How to use this tool

  1. Choose a template

    Start with the Node, Python, Docker or static-site preset to get a working baseline.

  2. Edit the pipeline

    Set the image, branch name, step name and script commands. Add caches or a service from the defined list.

  3. Review validation

    Errors block the valid badge and name the field; warnings explain risky timeouts, secret-like strings or deployment ordering.

  4. Copy or download

    Copy the YAML or save it as bitbucket-pipelines.yml at the root of your repository.

Use cases

First CI setup

Stand up a repository's first pipeline without memorizing Bitbucket's schema.

Migration from GitLab CI

Translate the idea of jobs and caches into the Pipelines grammar.

Deployment automation

Attach manual approval to a production deployment step.

Step fields emitted

FieldYAML key
Script commandsscript
Cachescaches
Servicesservices
Artifactsartifacts
Timeoutmax-time
Deploymentdeployment + trigger

Output is deterministic: image, definitions, clone, then pipelines.

Common mistakes

Mistake:Defining a cache as npm.

Fix:Use the built-ins node or node_modules, or define your own cache path.

Mistake:Writing caches: at step level without a definitions entry.

Fix:Custom caches must be declared under definitions.caches first.

Mistake:Inlining an API token in a script line.

Fix:Add a repository variable and reference it as $API_TOKEN.

Mistake:Putting a deployment step before tests.

Fix:Move deployment last; the validator warns when it is not.

Mistake:Expecting Bitbucket Server syntax.

Fix:This targets Bitbucket Cloud only.

Frequently asked questions

Where do caches go in bitbucket-pipelines.yml?

Custom caches are declared under definitions.caches with a path, then referenced by name in a step's caches list. Bitbucket also provides built-ins such as node, node_modules, pip and docker. There is no built-in called npm — use node or node_modules instead.

What memory does a step get and how do I change it?

Bitbucket Cloud assigns memory according to step size: 1x is the default, 2x and 4x increase the allocation at the cost of build minutes. Set size on a step and check the current Atlassian documentation for exact figures, since the limits evolve.

How long can a step run?

Set max-time in minutes on the step. The generator accepts 1 to 240 and warns above 120 so you can split a long suite. Very long steps can still be cancelled by the platform.

How do manual deployment steps work?

Add deployment: <environment> to a step and trigger: manual beside it. The environment name must exist in the workspace. Deployment steps should be last so tests run before the release.

Can steps run in parallel?

Bitbucket supports a parallel: group of steps. This generator emits sequential steps in v1; parallel groups are not available in the basic editor.

Is my configuration uploaded?

No. YAML assembly, validation and import all run in your browser tab. Nothing is sent to a server and no repository credentials are collected.

References & standards