Close

How to use Jira for Continuous Integration and Delivery

Illustration of people walking into a monitor with Jira displayed

Why you should connect your CI/CD tools

For software teams that practice continuous integration and delivery, developers now own and maintain their own pipeline. This puts developers in control of how code gets shipped to customers. This awesome power also comes with new challenges. 

Jira Software can help you manage your work from backlog all the way to customer release with no extra effort. This guide explains how Jira’s functionality and integration can provide a solution.

Here are three use cases of how Jira helps teams practicing CI/CD:

Use case 1: Foster a culture of collaboration across DevOps teams

With better information sharing between tools in your delivery stack, you can also improve cross-collaboration between teams. How many times have you asked someone whether or not a feature was deployed?

Dev tools ticketview

Now, you can easily look at any Jira issue and see what environment your code is on. This creates a much more open, collaborative, and self-service environment. Teams such as QA and operations can collaborate in the software teams sprint. With cross-cutting workflow between QA and developers, you can create a rapid feedback loop for testing at any point of your development process. Learn more about development information in Jira.

Use case 2: Reduce your change failure rate by building workflows around your deployment pipeline

If you team is practicing CI/CD and runs their own services, then that means you will need to invest in operating those services and maintaining a healthy pipeline. As with any complex system, failures are bound to happen, therefore it’s really a matter of how frequently this happens and how fast you can respond when it does. Enter the DevOps side of the equation - bringing operations and development closer together.

Incident Management Handbook Cover

Get the free copy of how Atlassian runs incident management.

Use case 3: Deploy more often with better insight into what's ready for release

The Jira Release Hub displays the teams progress towards the next version or product increment. If you connect your developer tools, commit, PR and build information related to a release version is also shown. This can help you spot potential development issues that could cause problems for a planned release. Learn more about release management in Jira.

Release hub

How to get started

1. Link your code repository

Before adding CI/CD integrations, make sure your code repository is connected with Jira. Jira Software uses information from your code repository to associate Jira issues with builds and deployments. Learn more about integrations with code repositories.

Note: The easiest way to associate a Jira issue with information in your CI/CD tool is to add the Jira Issue Key to the Commit Message. Example: “TEST-2332”

2. Add your build and deployment tool

3. Configure your pipeline

  Configuration sets
Bitbucket

No action required - Bitbucket Pipelines will automatically pick up any related Jira issues when that pipeline is run.

Jenkins

1.Go into a specific pipeline in Jenkins 

2. From the left-hand menu, select Pipeline Syntax.

3. In the Snippet Generator, select jiraSendDeploymentInfo or jiraSendBuildInfo from the dropdown list of Sample Steps and fill in the relevant details.

4. Select Generate Pipeline Script and copy/paste the output into your Jenkinsfile on the relevant Repository you are using. This will be used to notify Jira when you run that pipeline on that repo.

See here for an example snippet.

CircleCI

1. Make sure that you are using version 2.1 at the top of your .circleci/config.yml file.

2. If you do not already have pipelines enabled, go to Project Settings -> Build Settings -> Advanced Settings and enable them.

3. Create an API token for build information retrieval, go to Project Settings -> Permissions -> API Permissions and create a token with Scope: all. Copy the token.

4. To allow the integration to then use that key, go to Project Settings -> Build Settings -> Environment Variables and add a variable named CIRCLE_TOKEN with the value being the token you just made.

5. Add the orb stanza, invoking the Jira orb.

6. Use the Jira orb in a step.

See here for an example snippet.

Others

For other tools please refer to the information listed on the marketplace listing. Find more information.

 

Developer tool integrations

Learn how Jira works helps manage your Git workflows.

Advanced Search and JQL

Learn the ins and outs of Jira’s Querying Language (JQL).

Get started with Jira Software free today