Backgorud
When you want to add build status to your Bitbucket the specific commit of a branch when you start a build from the branch
When the build status is wrong, you want to update it manually. for example, update build status from FAILED to SUCCESSFUL
You can call Bitbucket REST API to do these.
Code snippet
Below is the code snippet to update Bitbucket build status with REST API in the shell script.
The code on GitHub Gist: https://gist.github.com/shenxianpeng/bd5eddc5fb39e54110afb8e2e7a6c4fb
Click Read More to view the code here.
|
And the screenshot of the final update result