Send a build status to Bitbucket using the Bitbucket Cloud Build Status Notifier (BCBSN).
The Bitbucket Cloud Build Status Notifier (BCBSN) is a tool that sends a build status to bitbucket cloud. Oauth credentials are required to perform this action and these have to be created in the user settings menu that resides in bitbucket cloud. Note: a Callback URL, e.g. https://ci-system-name/ is required in order to create Oauth credentials and one has to check ‘private consumer’ if the build status has to be sent to private repositories.
In order to run this tool, one could choose to download the binary from the releases section in this repository or use docker.
Example for running this command given:
To print the help message
docker run utrecht/bcbsn:2.0.7 -h
returns:
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