Sends a status update to a BitBucket server via the REST API
Further information: https://developer.atlassian.com/server/bitbucket/how-tos/updating-build-status-for-commits/
Add your BitBucket authentication as a secret variable with the recommended key SECRET_BITBUCKET_AUTH.
We recommend to add BitBucket server url as env variable with the key BITBUCKET_STATUS_URL.
secret variable:
- SECRET_BITBUCKET_AUTH: auth for bitbucket server like: username:password
env variable:
- BITBUCKET_STATUS_URL: url to the bitbucket server e.g. https://git.yourbitbucketserver.com/rest/build-status/1.0/commits
We recommend to add this step at the very beginning of your workflow and set the status to INPROGRESS.
At the very end of your workflow you can add this step with the status AUTO. AUTO will set SUCCESSFUL or FAILED depending on BITRISE_BUILD_STATUS.
As default values for name GIT_CLONE_COMMIT_AUTHOR_NAME and for description GIT_CLONE_COMMIT_MESSAGE_BODY is used. As key the default "BITRISE" is used.
Debug logs for step can be enabled by setting is_debug_mode to "yes".
Add the step to your yaml file:
# ...
workflows:
Checkout:
steps:
- git::https://github.com/the-Hill/bitbucket-build-status-update.git:
# ...
You can share your Step or step version with the bitrise CLI. If you use the bitrise.yml
included in this repository, all you have to do is:
- In your Terminal / Command Line
cd
into this directory (where thebitrise.yml
of the step is located) - Run:
bitrise run test
to test the step - Run:
bitrise run audit-this-step
to audit thestep.yml
- Check the
share-this-step
workflow in thebitrise.yml
, and fill out theenvs
if you haven't done so already (don't forget to bump the version number if this is an update of your step!) - Then run:
bitrise run share-this-step
to share the step (version) you specified in theenvs
- Send the Pull Request, as described in the logs of
bitrise run share-this-step
That's all ;)