Integrate Jira and Pipelines
The Bitbucket Pipelines and Jira integration allows your team to automatically track associated builds and deployments to Jira work items. This removes the need to manually keep your Jira work items up to date while giving the entire team visibility into the status of your work across individual work item views, viewing a specific deployments, or looking across work such as Sprint or Epic views.
Specifically, this integration allows you to:
Automatically view up-to-date build and deployment information from Bitbucket Pipelines on each Jira work item.
Answer complex questions about where your work is in context of your delivery pipeline through JQL (Jira Query Language) in Jira.
Use deep links to navigate between deployments and work items - Atlassian automatically connects all of this work together.
Use the Bitbucket deployment screen to view all Jira work items that were part of a single deployment along with their status.
Before you begin
Time: 0-15 mins
Prerequisites
You have connected your Bitbucket Cloud account and Jira instance. You can do this from within Bitbucket (see documentation) or within Jira (see documentation).
You need to have Jira work item keys (e.g. 'TEST-123') referenced in your commits and branches. This is how we automatically detect related work items when your pipeline is building and deploying code changes. (See documentation).
How to get started
If you already have Bitbucket Pipelines configured and are running pipelines, then great news, everything will work out of the box! All you have to do is reference Jira work item keys in your commits and branches as mentioned above and this will automatically connect information together.
If you do not have Bitbucket Pipelines configured yet, then follow the steps below.
Follow the steps in Get Started with Bitbucket Pipelines and create your bitbucket-pipelines.yml file.
Now, every time your pipeline runs against code changes it will communicate the status of that build to relates work items referenced on the commit or branch. If you have any deployment steps in your pipeline, that will be communicated as well. This all happens automatically, saving you time and keeping all of your work in sync!
See your builds in Jira
To see your build information in Jira, just put the work item 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 work item ST-1 every time your pipeline runs against a commit within that branch.
You can click on builds in the development panel to find out more information.
See your deployments in Jira
To see your deployment information in Jira, just put the work item key in each commit message. For example your commit could be called 'DEVOPS-5 Streamlining the selector code'
and any deployment that includes that commit will also be represented on the Jira work item DEVOPS-5.
You can click on deployments in the development panel to find out more information.
Query build or deployment information in JIRA
Once you have everything set up and are automatically syncing build and deployment information to your Jira work items, you can search across this information through the Jira Query Language (JQL). This allows you to answer extremely valuable questions like
Which work tiems in the current sprint have been deployed to staging or production?
Which work items in this epic have had a failed deployment?
Which work items across these 5 projects have an open pull request and a failing build?
Which work items across my entire Jira site have been deployed to production but are still in a 'QA Review' status?
The possibilities are endless and give you a lot of flexibility to find the information you need to make decisions. You can read about all the available queries here: Advanced searching - developer reference.
Was this helpful?