Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Testing Pipelines Locally

Max Mycroft
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 8, 2026

I'm looking for ways to validate my pipelines will run before sending them to PR. Is there a simple way to write tests for the bitbucket-pipeline.yml file?

For example a pipeline that builds and deploys a react app, I would want to run the build step, verify the build files are there then ftp to a mocked location, or maybe just somewhere on my local machine.

I am aware of the validator tool, but it still feels like a bit of a shot in the dark whether my pipeline will run successfully or not and I'm burning through PRs.

1 answer

1 vote
Gabriela
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
July 8, 2026

Hi @Max Mycroft. The validator only checks the file's structure, so it can't tell you whether the build or the FTP step will actually run. That's the gap you're hitting. Atlassian doesn't offer a way to execute a whole bitbucket-pipelines.yml locally as-is. What works is reproducing a single step by hand. Pull the same image your step declares, mount your repo, and run the script lines yourself:

docker run -it --volume=$(pwd):/app --workdir=/app node:20 /bin/bash

Swap node:20 for your step's image. Inside there you run your build, confirm the artifacts are present, and point the FTP at a local folder (or a throwaway ftp container) rather than the real host. Atlassian documents this at https://support.atlassian.com/bitbucket-cloud/kb/debug-pipelines-locally-with-docker/

On the PRs, you don't need one to trigger a build. Push to a throwaway branch and the pipeline runs there, then delete the branch. You get the real runner's result without opening a PR.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events