File size: 3,151 Bytes
d086025 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | # bcbsn — Bitbucket Cloud Build Status Notifier
BCBSN is a CLI tool that sends a build status to Bitbucket Cloud.
## Requirements
- OAuth credentials created in the Bitbucket Cloud **user settings** menu.
- A **Callback URL** (e.g. `https://ci-system-name/`) is required in order to
create the OAuth credentials.
- Check **'private consumer'** if the build status has to be sent to private
repositories.
## Installation / running
Either download the binary from the releases section of the repository or use
Docker:
```bash
docker run utrecht/bcbsn:2.0.7 -h
```
## Usage
```
Usage of /usr/local/bcbsn:
-clientID string
The clientID used for the 'client credentials' token flow with BitBucket
-clientSecret string
The clientSecret used for the 'client credentials' token flow with BitBucket
-commit string
The commit, e.g. 57484fd5460017aef111e8b4ec116a30ff0b4904
-key string
The key, e.g. a unique id of the build (use the build id)
-name string
An identifier for the build e.g. 'build 2'
-owner string
The owner of the repository, e.g. it is 'atlassian' in 'https://bitbucket.org/atlassian/stash-example-plugin/src/master/'
-repoSlug string
The repoSlug, e.g. some-repository
-state string
The state, e.g. SUCCESSFUL, INPROGRESS or FAILED
-url string
The url, e.g. https://travis-ci.org/030/bcbsn/builds/523263434
```
### Flags
| Flag | Description |
|----------------|-----------------------------------------------------------------------------|
| `-clientID` | Client ID for the 'client credentials' token flow with BitBucket |
| `-clientSecret`| Client secret for the 'client credentials' token flow with BitBucket |
| `-commit` | Git commit hash, e.g. `57484fd5460017aef111e8b4ec116a30ff0b4904` |
| `-key` | Unique id of the build (use the build id) |
| `-name` | Identifier for the build, e.g. `'build 2'` |
| `-owner` | Owner of the repository (the account name in the Bitbucket URL) |
| `-repoSlug` | Repository slug, e.g. `some-repository` |
| `-state` | Build state: `SUCCESSFUL`, `INPROGRESS` or `FAILED` |
| `-url` | Build URL, e.g. `https://travis-ci.org/030/bcbsn/builds/523263434` |
### Example parameters
- **client id**: `1234`
- **client secret**: `4567`
- **build state**: `INPROGRESS`
- **git commit hash**: `f76d123498a053c1789057a41d6c3fcvg8b49cd7`
- **owner**: `030`
- **repository name**: `bcbsn`
- **build number**: `70`
- **build url**: `https://travis-ci.org/030/bcbsn/builds/523263434/`
### Example invocations
```bash
docker run utrecht/bcbsn:2.0.7 -h
docker run utrecht/bcbsn:2.0.7 \
-clientID 1234 \
-clientSecret 4567 \
-state INPROGRESS \
-commit f76d123498a053c1789057a41d6c3fcvg8b49cd7 \
-owner 030 \
-repoSlug bcbsn \
-key 70 \
-name "build 70" \
-url https://travis-ci.org/030/bcbsn/builds/523263434/
```
|