Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to integrate TeamCity CI/CD with Bitbucket

With the introduction of Integrated CI/CD in Bitbucket Server & Data Center 7.4, Atlassian made a massive step towards the unification of the development processes, allowing developers to focus on things that matter instead of wasting time switching tools. The platforms supported out-of-the-box already include Bamboo and Jenkins, and today we want to show how this list can be extended to benefit TeamCity users as well.

The TeamCity Integration for Bitbucket app by Stiltsoft allows you to:

  • View build results
  • Access logs and artifacts via direct links
  • Act on builds in your TeamCity server from Bitbucket

Screen Shot 2021-04-20 at 1.38.24 PM.png

Link Bitbucket with TeamCity

To get access to all the features offered by the app, you'll need to link your TeamCity and Bitbucket accounts using the access tokens.

First, go to your TeamCity profile to create an access token.

Screen Shot 2021-04-20 at 1.39.11 PM.png

Then you need to add this token to your Bitbucket profile.

Click on your avatar in the header and then on Manage account. Choose the TeamCity tab in the navigation bar, and add the token!

Screen Shot 2021-04-20 at 1.40.04 PM.png

 

After you've linked your TeamCity and Bitbucket accounts, you'll need to edit your build configuration in TeamCity and add Commit Status Publisher to it.

Go to the Configuration Settings on a build page, choose the Build Features.

Screen Shot 2021-04-20 at 1.40.48 PM.png

 

Add Commit Status Publisher and set it up for Bitbucket.

Screen Shot 2021-04-20 at 1.41.48 PM.png

Run builds, view logs, download artifacts

Now, that the setup is complete you can finally begin to reap the benefits of this integration!

On the Builds page, you can view build statuses, links to logs and artifacts, as well as perform build actions. At the moment, the list of actions include:

  • Build the latest commit — running a build for the latest commit in a branch
  • Re-build this commit — re-running a build for a particular commit

Screen Shot 2021-04-20 at 1.42.42 PM.png

You'll also see build statuses on the Pull request, Commits, and Branches pages. If you click on any status icon there, it will take you to the Builds page pre-set to show builds information for each commit in a pull request, for a particular commit or a branch, respectively.

Screen Shot 2021-04-20 at 1.43.22 PM.png

Screen Shot 2021-04-20 at 1.43.37 PM.png

TeamCity Integration for Bitbucket is available in the Marketplace for both Server and Data Center customers. If you have any questions about the app or feedback, feel free to comment below!

0 comments

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events