This build feature sends build status updates from TeamCity to Bitbucket. You can then see build statuses against commits.
Why use this
Reporting build statuses to Bitbucket is a useful way of working with pull requests. Bitbucket allows you to restrict pull request approvals to a passing builds in addition to the usual approvers, so this can be used to gain some confidence with regards to the quality of a pull request.
Download the .zip file and place it in the
<TeamCity data directory>/plugins folder, then restart TeamCity.
Under your build steps, click on
Add Build Feature. It will appear in the dropdown list.
Simply enter your Bitbucket server details and credentials to connect with. The plugin will now send build status updates to your Bitbucket server.
How it works
This is a TeamCity Build Feature built using the TeamCity Open API.
It listens for build statuses and posts them to the Atlassian Bitbucket Build API.
You will need IntelliJ IDEA as this project uses IDEA features to build artifacts.
You will also need to download and extract TeamCity which provides the required jars.
Open the project in Intellij IDEA, you should see a lot of unresolved references, this is normal.
File | Settings | Path Variables and set the
TeamCityDistribution variable, pointing it to your TeamCity location.
To build the project, click
Build | Build Artifacts... and choose
plugin-zip. The .zip is generated in
If the plugin doesn’t seem to be working, you can find plugin messages in the
teamcity-server.log file under your TeamCity installation. (Example:
This usually gives you a good idea of why a call may have failed.
You can also look at Bitbucket’s
BITBUCKET_HOME’s log folder (Example:
/Bitbucket-Home/log/atlassian-bitbucket.log) file to see what it did with the HTTP request sent by the plugin. In the log file, search for
POST /rest/build-status as a starting point.