Integrating Jira and Pipelines

Bitbucket Pipelines integrations

On this page

Still need help?

The Atlassian Community is here for you.

Ask the community

The Bitbucket Pipelines integration with Jira Software allows your teams to get visibility into the delivery pipeline for a Jira issue associated with Bitbucket Cloud. Use this integration to:

  • View up-to-date build and deployment information from Bitbucket on each issue in Jira.
  • Answer complex questions about your delivery pipeline with support for JQL queries in Jira.
  • Use deep links from the Jira issue to go directly to relevant screens in Bitbucket.
  • Use the Bitbucket Deployment screens to view all Jira issues that were worked on as part of a deployment along with their status.


Teams will be able to use JQL to set up a custom view to alert them of any Jira issues assigned to them with failed builds. Viewing this information in Jira helps troubleshoot errors as it surfaces context around associated work items, build history, and who has previously worked on the issue.

How to integrate with Jira Software with Bitbucket Cloud

Connect Jira Cloud applications with your Bitbucket Cloud account for your team to enjoy the seamless integration of issues and code.

By connecting to Bitbucket, you can:

  • Surface repository activity – Jira issues automatically update to show repo branch, commit, pull request activity, and, if you have Bitbucket Pipelines enabled, your builds and deployments.
  • Get deep integration in Bitbucket – See the core details of Jira issues without having to change context, from anywhere in Bitbucket you see a Jira issue key, including commit messages, pull request comments, and deployment information.
  • Automate Jira workflows – Jira workflows sync with repo activity to update automatically as you work.

Read more about the benefits of integrating Jira applications with Bitbucket Cloud. If you're using a Jira Server application, see Linking a Bitbucket or GitHub repository with Jira.

Connect Jira Cloud with a Bitbucket Cloud account

Prerequisites:

  • To link Jira and Bitbucket Cloud you will need to have a Jira Software subscription.
  • Log in to Jira Software as admin (Jira project admin permissions are not sufficient).

If you're connecting a Jira Software project:

  1. Choose the Jira icon (, or ) > Projects.
  2. Select the project you want to connect with.
  3. In the project sidebar, choose Add item.
  4. Enter the Bitbucket repo's URL you want to connect.

Once the link is created, choose Integrate Bitbucket to sync your Jira and Bitbucket accounts.

If you're connecting a Jira Core project:

  1. Choose the Jira icon (, or ) > Jira settings > Products.
  2. Under INTEGRATIONS, select DVCS accounts.
  3. Select Link Bitbucket Cloud account.

If you're connecting a Jira Service Desk project:

  1. Choose the Jira icon (, or ) > Projects.
  2. Select Project Settings.
  3. Scroll down to Development tools.
  4. Click Connect and select Bitbucket Cloud.

Once the link is created, choose Integrate Bitbucket to sync your Jira and Bitbucket accounts.

Continue the connection process in Bitbucket

The connection process takes you to Bitbucket. Make sure you're logged in to the Bitbucket account that has the repos you want to connect with Jira, and then Grant access for Jira to your Bitbucket account.

Now, in Bitbucket, grant Bitbucket access to Jira.

You can choose how Jira should handle syncing and Smart Commits for the repos in the Bitbucket account.

Choose whether Jira Cloud should:

  • automatically sync all existing repos in the Bitbucket account, and any repos added in the future. Syncing ensures that repo activity is updated in Jira in real time.
  • enable Smart Commits for all existing repos in the account and for any repos added in future. 
    See Processing Jira issues with Smart Commits.

You can manage these settings later from the DVCS accounts settings page in Jira. See Manage your linked account below.

Once connected, you'll see your Bitbucket repos listed on the DVCS accounts settings page in Jira.

Approve an uncompleted connection request

When someone begins connecting Jira with Bitbucket Cloud, but is unable to complete the process because they're not logged in as a Jira admin (although they may be logged in as a Jira project admin, for example).

Their options are to:

  • Log out and log back in using a Jira admin account, if they have such an account.
  • Ask a Jira admin to complete the connection.

In either case, a Jira admin can complete the connection using the step listed above.

Manage your linked account settings

After you link a Bitbucket Cloud account with Jira Software, you can manage the connection and the linked repos from the 'DVCS accounts' page in Jira.

If you're having problems with the connection, see Troubleshoot connections with Bitbucket Cloud.


Action Instruction

Remove a repo

Hover over the row for the repo in the 'DVCS accounts' page, and click the 'X' on the right.

Add a repo

Start typing the repo name in the Add repository field until you see the one you want, then click Add.
Control Smart Commits

For the account: choose Configure default repository settings from the Actions menu.

Now modify the Smart Commits default setting as required:

The changed setting only applies to new repos added to the Bitbucket account.

For a repo: select, or clear, the Smart Commits checkbox in the row for the repo, as required.

Read more about processing Jira issues using Smart Commits.

Control auto-syncing for repos Typically, new repos added to the Bitbucket account are automatically synced, to show new branch, commit and pull request activity in Jira. You can turn off auto-syncing for new repos by choosing Configure default repository settings from the Actions menu, and changing the Automatically sync checkbox.
Refresh the list of repos To manually update the list of connected repositories, choose Refresh repositories from the Actions menu.
Manually sync repo activity with Jira
  1. To manually refresh your repositories in Jira, choose Jira Settings from the left navigation menu Products from the Jira Settings menu DVCS accounts under the Integrations heading.
  2. Click more options button in the upper-right corner of your repository list.
  3. Select Refresh repositories from the More options dropdown menu.
Disconnect the Bitbucket account Choose Configure default repository settings from the Actions menu, then Delete.

See your builds in Jira

To see your build information in Jira, just put the issue key in the branch name. For example, your branch could be called feature/ST-1-build-mk2-boosters and then build information would appear in the Jira issue ST-1.

You can click on the builds in the development panel to find out more information.

Last modified on Jul 11, 2019

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.