# bitbucket-build-status

> Creates Bitbucket Build Statuses via REST

Latest version **1.2.0** (published 2020-02-19) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install bitbucket-build-status
pnpm add bitbucket-build-status
yarn add bitbucket-build-status
bun add bitbucket-build-status
```

Provides the command `bbuild`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.0 |
| Published | 2020-02-19 |
| First published | 2015-11-30 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 5.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Tim Pettersen |
| Maintainers | rajabellebon, tpettersen |

## Links

- npm: https://www.npmjs.com/package/bitbucket-build-status
- Repository: https://bitbucket.org/tpettersen/bitbucket-build-status
- Homepage: https://bitbucket.org/tpettersen/bitbucket-build-status#readme
- npm.io page: https://npm.io/package/bitbucket-build-status

## Dependencies (4)

- [lodash](https://npm.io/package/lodash.md) ^4.17.14
- [jsonfile](https://npm.io/package/jsonfile.md) ^2.2.3
- [commander](https://npm.io/package/commander.md) ^2.9.0
- [superagent](https://npm.io/package/superagent.md) ^5.2.1

## Recent versions

- 1.2.0 (latest) — 2020-02-19
- 1.1.0 — 2019-07-16
- 1.0.3 — 2017-09-14
- 1.0.2 — 2016-09-28
- 1.0.1 — 2015-11-30
- 1.0.0 — 2015-11-30

## README

# 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

---
_Source: https://npm.io/package/bitbucket-build-status · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
