Bitbucket Pipelines Importer helps automate your migration to Bitbucket Pipelines from another CI platform. Currently it supports Jenkins and Bamboo(Beta).
Bitbucket Pipelines Importer is distributed as a Docker image. You can also compile and run it as a Java application. This allows you to extend the tool to map additional CI plugins to Bitbucket Pipelines features.
The Docker CLI must be installed and running.
(Optional) Pull the latest Docker image:
This step is only required if you have pulled or run the Docker image before and want to ensure you have the latest version.
docker pull atlassian/bitbucket-pipelines-importer
Print the help message:
docker run -it --rm atlassian/bitbucket-pipelines-importer --help
To migrate a CI configuration to Bitbucket Pipelines:
Export a variable for the mount path in the Docker container:
export MOUNT_PATH=/files
Run the Docker container:
Jenkins:
docker run -it --rm \
-e MOUNT_PATH=$MOUNT_PATH \
-v $PWD/workDir:$MOUNT_PATH \
atlassian/bitbucket-pipelines-importer migrate jenkins \
-i "${MOUNT_PATH}/Jenkinsfile" \
-o "${MOUNT_PATH}/bitbucket-pipelines.yml"
Bamboo:
docker run -it --rm \
-e MOUNT_PATH=$MOUNT_PATH \
-v $PWD/workDir:$MOUNT_PATH \
atlassian/bitbucket-pipelines-importer migrate bamboo \
-i "${MOUNT_PATH}/bamboo_file.yml" \
-o "${MOUNT_PATH}/bitbucket-pipelines.yml"
Build the JAR file:
mvn package spring-boot:repackage
Run the JAR file:
Jenkins:
java -jar target/bitbucket-pipelines-importer-<version>.jar \
migrate jenkins \
-i Jenkinsfile \
-o bitbucket-pipelines.yml
Bamboo:
java -jar target/bitbucket-pipelines-importer-<version>.jar \
migrate bamboo \
-i bamboo_file.yml \
-o bitbucket-pipelines.yml
Alternatively, you can build and run the Docker image locally:
Build the Docker image:
docker build -t bitbucket-pipelines-importer .
Run the Docker container:
docker run -it --rm bitbucket-pipelines-importer --help
The migrate command converts Bamboo plans into a Bitbucket Pipelines
bitbucket-pipelines.yml configuration file.
| Parameter | Required | Repeatable | Description |
|---|---|---|---|
--bamboo-instance-url | Yes | No | Base URL of your Bamboo instance (e.g. https://bamboo.example.com). |
--bamboo-access-token | Yes | No | Bearer token used to authenticate against the Bamboo REST API. |
--output-dir | Yes | No | Directory where the migrated pipeline YAML file(s) will be written. |
--project-key | No | Yes | Bamboo project key(s) to migrate. Mutually exclusive with --plan-key. |
--plan-key | No | Yes | Bamboo plan key(s) to migrate (format: PROJECT_KEY-PLAN_KEY, e.g. PROJ1-PLAN1). Mutually exclusive with --project-key. |
-i / --input | No | No | Path to a local Bamboo YAML spec file to migrate (file-based mode). Mutually exclusive with Bamboo connectivity options. |
-o / --output | No | No | Path for the output bitbucket-pipelines.yml file (file-based mode). |
Note: If neither
--project-keynor--plan-keyis provided (and-iis not used), the migration will run against all plans in the Bamboo instance (instance-level migration).
When migrating an entire instance, files are written under:
<output-dir>/
<bamboo-hostname>/
<timestamp>/
build/
<PROJECT_KEY>/
<PLAN_KEY>/
pipelines.yml ← the generated Bitbucket Pipelines configuration
bamboo_plan.yml ← the original Bamboo plan YAML spec
deployments/
<DEPLOYMENT_PROJECT_ID>/
pipelines.yml ← generated deployment-compatible config (when applicable)
bamboo_plan.yml ← source deployment plan/details (when applicable)
Migrate an entire Bamboo instance:
export MOUNT_PATH=/files
docker run -it --rm \
-e MOUNT_PATH=$MOUNT_PATH \
-v $PWD/workDir:$MOUNT_PATH \
atlassian/bitbucket-pipelines-importer migrate bamboo \
--output-dir "${MOUNT_PATH}/migrate-output" \
--bamboo-instance-url $BAMBOO_INSTANCE_URL \
--bamboo-access-token $BAMBOO_ACCESS_TOKEN
Migrate specific projects:
export MOUNT_PATH=/files
docker run -it --rm \
-e MOUNT_PATH=$MOUNT_PATH \
-v $PWD/workDir:$MOUNT_PATH \
atlassian/bitbucket-pipelines-importer migrate bamboo \
--project-key PROJ1 --project-key PROJ2 \
--output-dir "${MOUNT_PATH}/migrate-output" \
--bamboo-instance-url $BAMBOO_INSTANCE_URL \
--bamboo-access-token $BAMBOO_ACCESS_TOKEN
Migrate specific plans:
export MOUNT_PATH=/files
docker run -it --rm \
-e MOUNT_PATH=$MOUNT_PATH \
-v $PWD/workDir:$MOUNT_PATH \
atlassian/bitbucket-pipelines-importer migrate bamboo \
--plan-key PROJ1-PLAN1 --plan-key PROJ1-PLAN2 \
--output-dir "${MOUNT_PATH}/migrate-output" \
--bamboo-instance-url $BAMBOO_INSTANCE_URL \
--bamboo-access-token $BAMBOO_ACCESS_TOKEN
Migrate from a local Bamboo YAML file:
export MOUNT_PATH=/files
docker run -it --rm \
-e MOUNT_PATH=$MOUNT_PATH \
-v $PWD/workDir:$MOUNT_PATH \
atlassian/bitbucket-pipelines-importer migrate bamboo \
-i "${MOUNT_PATH}/bamboo_file.yml" \
-o "${MOUNT_PATH}/bitbucket-pipelines.yml"
Bamboo plans sometimes contain any-task entries — tasks that reference a third-party or custom
plugin the importer does not natively support. The custom transformers feature lets you provide
a Python script that converts a specific any-task plugin into a Bitbucket Pipelines pipe or shell
script, so the migration is fully automated.
Pass one or more transformer scripts via --custom-transformers:
docker run -it --rm \
-e MOUNT_PATH=$MOUNT_PATH \
-v $PWD:$MOUNT_PATH \
atlassian/bitbucket-pipelines-importer migrate bamboo \
-i "${MOUNT_PATH}/bamboo_file.yml" \
-o "${MOUNT_PATH}/bitbucket-pipelines.yml" \
--custom-transformers "${MOUNT_PATH}/scripts/my-plugin-transformer.py"
Read the Custom Transformers Guide for the full script
contract, step-level configuration (oidc, docker), OIDC setup for AWS, and worked examples.
The audit command analyzes your Bamboo plans and produces a migration-readiness report.
| Parameter | Required | Repeatable | Description |
|---|---|---|---|
--bamboo-instance-url | Yes | No | Base URL of your Bamboo instance (e.g. https://bamboo.example.com). |
--bamboo-access-token | Yes | No | Bearer token used to authenticate against the Bamboo REST API. |
--output-dir | Yes | No | Directory where audit report files will be written. |
--project-key | No | Yes | Bamboo project key(s) to audit. Mutually exclusive with --plan-key. |
--plan-key | No | Yes | Bamboo plan key(s) to audit (format: PROJECT_KEY-PLAN_KEY, e.g. PROJ1-PLAN1). Mutually exclusive with --project-key. |
Note: If neither
--project-keynor--plan-keyis provided, the audit will run against all plans in the Bamboo instance.
The audit command generates the following files in the specified output directory:
audit_summary.md — A high-level summary of the audit results across all plans.audit.md — Detailed audit information for each plan.Audit an entire Bamboo instance:
export MOUNT_PATH=/files
docker run -it --rm \
-e MOUNT_PATH=$MOUNT_PATH \
-v $PWD/workDir:$MOUNT_PATH \
atlassian/bitbucket-pipelines-importer audit bamboo \
--output-dir "${MOUNT_PATH}/audit-reports" \
--bamboo-instance-url $BAMBOO_INSTANCE_URL \
--bamboo-access-token $BAMBOO_ACCESS_TOKEN
Audit specific projects:
export MOUNT_PATH=/files
docker run -it --rm \
-e MOUNT_PATH=$MOUNT_PATH \
-v $PWD/workDir:$MOUNT_PATH \
atlassian/bitbucket-pipelines-importer audit bamboo \
--project-key PROJ1 --project-key PROJ2 \
--output-dir "${MOUNT_PATH}/audit-reports" \
--bamboo-instance-url $BAMBOO_INSTANCE_URL \
--bamboo-access-token $BAMBOO_ACCESS_TOKEN
Audit specific plans:
export MOUNT_PATH=/files
docker run -it --rm \
-e MOUNT_PATH=$MOUNT_PATH \
-v $PWD/workDir:$MOUNT_PATH \
atlassian/bitbucket-pipelines-importer audit bamboo \
--plan-key PROJ1-PLAN1 --plan-key PROJ1-PLAN2 \
--output-dir "${MOUNT_PATH}/audit-reports" \
--bamboo-instance-url $BAMBOO_INSTANCE_URL \
--bamboo-access-token $BAMBOO_ACCESS_TOKEN
The forecast command analyzes your Bamboo plans and produces a cost and performance forecast
report for migrating to
Bitbucket Pipelines. This helps you estimate the expected costs, execution times, and optimal runner
types before
committing to a migration.
| Parameter | Required | Repeatable | Description |
|---|---|---|---|
--bamboo-instance-url | Yes | No | Base URL of your Bamboo instance (e.g. https://bamboo.example.com). |
--bamboo-access-token | Yes | No | Bearer token used to authenticate against the Bamboo REST API. |
--output-dir | Yes | No | Directory where forecast report files will be written. |
--project-key | No | Yes | Bamboo project key(s) to forecast. Mutually exclusive with --plan-key. |
--plan-key | No | Yes | Bamboo plan key(s) to forecast (format: PROJECT_KEY-PLAN_KEY, e.g. PROJ1-PLAN1). Mutually exclusive with --project-key. |
--from-date | No | No | Start date for the forecast period (ISO format, e.g. 2025-01-01). Defaults to 1 month ago if not specified. |
--to-date | No | No | End date for the forecast period (ISO format, e.g. 2025-12-31). Defaults to today if not specified. |
--agent-config | No | No | Typical agent resources in cpu=N,memory=M format (e.g. cpu=4,memory=8). Both keys are required. Defaults to the RUNNER_2X runner type if not specified. |
Note: If neither
--project-keynor--plan-keyis provided, the forecast will run against all plans in the Bamboo instance.
The forecast command generates the following file in the specified output directory:
forecast_summary.md — A detailed forecast report containing:
Forecast an entire Bamboo instance:
export MOUNT_PATH=/files
docker run -it --rm \
-e MOUNT_PATH=$MOUNT_PATH \
-v $PWD/workDir:$MOUNT_PATH \
atlassian/bitbucket-pipelines-importer forecast bamboo \
--output-dir "${MOUNT_PATH}/forecast-reports" \
--bamboo-instance-url $BAMBOO_INSTANCE_URL \
--bamboo-access-token $BAMBOO_ACCESS_TOKEN
Forecast specific projects:
export MOUNT_PATH=/files
docker run -it --rm \
-e MOUNT_PATH=$MOUNT_PATH \
-v $PWD/workDir:$MOUNT_PATH \
atlassian/bitbucket-pipelines-importer forecast bamboo \
--project-key PROJ1 --project-key PROJ2 \
--output-dir "${MOUNT_PATH}/forecast-reports" \
--bamboo-instance-url $BAMBOO_INSTANCE_URL \
--bamboo-access-token $BAMBOO_ACCESS_TOKEN
Forecast with a custom date range and agent configuration:
export MOUNT_PATH=/files
docker run -it --rm \
-e MOUNT_PATH=$MOUNT_PATH \
-v $PWD/workDir:$MOUNT_PATH \
atlassian/bitbucket-pipelines-importer forecast bamboo \
--plan-key PROJ1-PLAN1 \
--from-date 2026-02-01 \
--agent-config cpu=4,memory=8 \
--output-dir "${MOUNT_PATH}/forecast-reports" \
--bamboo-instance-url $BAMBOO_INSTANCE_URL \
--bamboo-access-token $BAMBOO_ACCESS_TOKEN
Detailed information about how to use Bitbucket Pipelines Importer can be found in the Jenkins migration guide and the Bamboo migration guide.
mvn verify
mvn spotless:apply
We use Lombok to reduce boilerplate code. To make your editor to be compatible with Lombok, follow the instructions below:
External developers are welcome to contribute to the tool and add support for additional Jenkins plugins. In most cases, though, we expect users to fork the migration tool repository when using source code and make changes privately to support their custom use cases.
The tool's pluggable architecture allows users to:
Create a new class that implements the PluginTranslationHandler interface provided by the tool.
public class CustomPluginHandler implements PluginMappingStrategy {
@Override
public PluginMappingResult map(MappingContext context, JenkinsStep jenkinsStep) {
return;
}
}
Register the custom handler in the Spring context or by defining it as a spring component, set which commands it supports, and set the plugin Precedence .
@Component
@Order(BeanPrecedence.DEFAULT_MID_IMPLEMENTATION)
@SupportedCommands({"custom"})
public class CustomPluginHandler implements PluginMappingStrategy {}
Create a new class that overrides the default implementation of the plugin handler.
Use the @Order annotation to set the precedence of the custom handler.
public interface BeanPrecedence {
int CUSTOM_IMPLEMENTATION = 1;
int DEFAULT_MID_IMPLEMENTATION = 10;
int DEFAULT_LOW_FALLBACK = 100;
}
@Component
@Order(BeanPrecedence.CUSTOM_IMPLEMENTATION)
@SupportedCommands({"sh"})
public class CustomPluginHandler implements PluginMappingStrategy {}
Contributions to Bitbucket Pipelines Importer are welcome! Please see CONTRIBUTING.md for details.
Become a member of the Bitbucket Pipelines community. This is the perfect place to ask questions, share your feedback, and express which CI plugins you would like to see supported. If you have questions or need assistance, just create a post in this space, and we'll help you get started.
Copyright (c) 2024 Atlassian US., Inc. Apache 2.0 licensed, see LICENSE file.
Content type
Image
Digest
sha256:c833c8b60…
Size
489.3 MB
Last updated
3 months ago
docker pull atlassian/bitbucket-pipelines-importerPulls:
207
Last week