Need help with bbrun?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

mserranom
127 Stars 22 Forks MIT License 94 Commits 24 Opened issues

Description

Run Bitbucket Pipelines locally

Services available

!
?

Need anything else?

Contributors list

# 105,387
C
TeX
Shell
ncov
30 commits
# 50,875
yarn
npm
ecmascr...
geotool...
1 commit
# 748
GitHub
rust-la...
wechat-...
herokua...
1 commit
# 339,674
CSS
HTML
pypi
continu...
1 commit
# 609,598
C#
mailchi...
JavaScr...
Shell
1 commit

Bitbucket Pipelines Runner

bbrun
is a command line tool to execute Bitbucket Pipelines locally.

Build Statusnpm version

Install

Install

bbrun
with
npm
:
$ npm install -g bbrun

Usage

bbrun
can execute any step defined in your
bitbucket-pipelines.yml
template:
pipelines:
  default:
    - step:
          name: hello
          image: ubuntu2
          script:
            - echo "hello world!"

Run

bbrun
straight from your project path:
$ bbrun hello
running "build" in "atlassian/default-image" image...
hello world!

Check the examples and its tests to learn different use cases.

Options

  Usage
    $ bbrun  

Options --template (-t), pipeline template, defaults to "bitbucket-pipelines.yml" --env (-e), define environment variables for execution --dry-run (-d), performs dry run, printing the docker command --interactive (-i), starts an interactive bash session in the container --ignore-folder (-f), adds the folder as an empty volume (useful for forcing pipeline to install packages etc) --help, prints this very guide

Examples: Execute all steps in the default pipeline from bitbucket-pipelines.yml $ bbrun $ bbrun --template bitbucket-template.yml $ bbrun --pipeline default Execute a single step by its name $ bbrun test $ bbrun "Integration Tests" Execute steps from different pipelines $ bbrun test --pipeline branches:master Define an environment variable $ bbrun test --env EDITOR=vim $ bbrun test --env "EDITOR=vim, USER=root"

Caveats

  • Not all Bitbucket features are covered, check open issues for an overview of the roadmap.
  • Private images are supported, but the user has to login in the Docker Registry before executing
    bbrun
    (thus credentials in the file are ignored).

Build and Test

npm install && npm test

To execute the tests under examples (which are not run by CI yet):

npm run test-examples

Install locally

$ npm install && npm link

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.