bprun
v0.12.2
Published
run your bitbucket pipelines locally with bun and docker.
Readme
bprun
bprun is a command line tool to execute bitbucket pipelines locally.
this project is a fork of bbrun.
made with <3 for okticket.
usage
bprun can execute any step defined in your bitbucket-pipelines.yml template:
pipelines:
default:
- step:
name: hello
image: ubuntu2
script:
- echo "hello world!"run bprun using bunx:
bunx bprun helloCheck the examples and its tests to learn different use cases.
flags
usage
$ bprun <step> <options>
options
--template (-t) pipeline template, defaults to "bitbucket-pipelines.yml"
--pipeline (-p) pipeline to execute, "default" if not provided
--env (-e) define environment variables for execution
--workDir (-w) docker working directory, defaults to "ws"
--dryRun (-d) performs dry run, printing the docker command
--interactive (-i) starts an interactive bash session in the container
--ignoreFolder (-f) maps the folder to an empty folder
--noRoot (-n) run the container as non-root user (default is to run as root)
--help prints this guidepipeline flag examples
The --pipeline flag allows you to execute pipelines other than the default:
# execute a branch pipeline
bprun --pipeline branches:master
bprun --pipeline branches:develop
# execute a custom pipeline
bprun --pipeline custom:deploy-prod
bprun --pipeline custom:build
# execute a tag pipeline
bprun --pipeline tags:v1.0.0
# execute a pull-request pipeline
bprun --pipeline pull-requests:masterYou can also execute a specific step within any pipeline:
# run "test" step from the master branch pipeline
bprun test --pipeline branches:masterdevelopment
# clone the repo
git clone https://github.com/miermontoto/bprun
cd bprun
# install dependencies
bun install
# run tests
bun run test
# link for local development
bun link