Bitbucket Cloud
Since TeamCity 10.0 TeamCity integrates with Bitbucket Cloud, and the integration with its issue tracker can be set up separately, or as a part of TeamCity integration with Bitbucket Cloudas a source code hosting service.
When setting up integration with the Bitbucket issue tracker, in addition to the repository URL and other general settings, you need to configure authentication and specify the issue ID pattern.
Authentication
TeamCity allows you to select whether you want to connect to Bitbucket issue tracker anonymously or to be authenticated via username/password.
Converting Strings into Links to Issues
You also need to specify which strings should be recognized as references to issues in your tracker. For Bitbucket , you need to use the regex syntax, e.g. #(\d+).
TeamCity will resolve the issue number mentioned in a VCS comment and will display a link to this issue in the Web UI (e.g. on the Changes Page, Issues tab of the build results page).