bitbucket-build-status

1.2.0 • Public • Published

Bitbucket Build Status

A small tool for POSTing build statuses to Bitbucket.

Installation

$ npm install -g bitbucket-build-status

Usage

$ bbuild --help

Usage: bbuild [options]

Options:

-h, --help                       output usage information
-e, --server <url>               the Bitbucket Server Base URL to POST the build status to (omit if targeting bitbucket.org)
-c, --commit <commit>            the commit to lodge the build status against
-r, --repo <repo>                the repository slug containing the commit
-o, --owner <owner>              user or team that owns the repository (defaults to username if omitted)
-s, --state <state>              INPROGRESS, SUCCESSFUL or FAILED
-k, --key <key>                  the build key
-n, --name <name>                the build name
-l, --url <url>                  the build url
-d, --description <description>  the build description
-u, --username <username>        the user to authenticate as
-p, --password <password>        the user's password
-f, --file <file>                JSON file containing the state, key, name, url and description. Values can be overridden with other commandline options

Example

$ bbuild -c <commit> -r <repository> -u <username> -p <passowrd>

Testing

Currently, changes can only be tested locally.
* In Bitbucket:
    - You can use one of your repository or create a new one. (Make sure, you have setup pipelines and run at least 1 build).
    - You need to create an app password to authenticate to Bitbuvket API.
* In your terminal:
    - Run
     $ node index.js -c <commit> -r <repository> -u <username>  -p <app password>
    - You should get:
     $ Created https://api.bitbucket.org/2.0/repositories/<username>/<repository>/commit/<commit>/statuses/build/BBS

Readme

Keywords

none

Package Sidebar

Install

npm i bitbucket-build-status

Weekly Downloads

17

Version

1.2.0

License

Apache-2.0

Unpacked Size

5.65 kB

Total Files

4

Last publish

Collaborators

  • rajabellebon
  • tpettersen