Jenkins Jira Integration: 3 Easy Steps

on Data Driven Strategies, Data Engineering, Data Integration, ETL Tutorials, Jenkins, Jira, Project Management Tool • November 8th, 2021 • Write for Hevo

Most developers prefer Jenkins for automation. The integration of Jenkins with Jira will benefit the Project Manager to track every Migration Pipeline, create traceability for all work items, and fulfill compliance requirements for enterprises. In case of build failure or abortion of the Pipeline, it might be possible that Jenkins will populate all the Jira details. As a result, the Project Manager can faster check logs and troubleshoot errors.

In this article, you will gain a basic understanding of Jenkins and Jira and will also learn their key features. In addition, you will understand the need for Jenkins Jira Integration. Moreover, you will learn a comprehensive free, secure, and reliable method to connect Jira cloud with Jenkins. To make it easier for you, this article provides all the essential steps to set up and work with Jenkins Jira Integration.

Table of Contents

Introduction to Jenkins

Jenkins Jira - Jenkins Logo
Image Source

Jenkins is a leading Open-Source Automation Server Tool preferred by most Developers. Earlier, the Developers had to perform code testing to check for errors. But with the introduction of this CI/CD Developer tool under an MIT license has eased the process. It helps automate the whole building process, ensures continuous integration, and produces higher efficiency. It comprises more than 1500 plugins for best functioning. Jenkins is written in Java programming language and supports Windows platform, macOS, and other UNIX versions.

Earlier Developers had to invest more time and energy, but with Jenkins, they can find and fix errors at the initial stages. Also, it allows you to integrate the SDLC process and help create web applications. In 2010, Oracle took over Sun Microsystems. As a result, a new fork of Hudson named Jenkins was created. This new DevOps tool allows seamless testing and deployment of the new codes. Further, it helps reduce the tester’s burden and improves efficiency in code builds and verification processes. The top DevOps tool supports Master-Slave architecture.

Jenkins has heavy community support. The only disadvantage with Jenkins is it is more Developer-centric. Thus, it requires an experienced Developer to perform testing and deployment processes. Also, you may find a few minor issues, like Jenkins not starting up when you install certain plugins. Yet, overall it has touched many hearts and become one of the top DevOps tools.

Key Features of Jenkins

Some of the amazing features supported by Jenkins are:

  • Easy to Setup: Jenkins is one of the best Automation tools that are compatible with macOS, Unix, Windows platforms. It is easy to install and can run as a servlet in Java containers. Remember, at the initial stage, you will need to JRE in the system for better installation.
  • Provides Numerous Plugins: With Jenkins, you can find more than 1500 plugins that make the customization process easier. This feature additionally saves on cost and helps the Developers to overcome any overhead expense.
  • Simple to Setup and Configure: It is much simple to set up and configure Jenkins with the help of provided documentation for the tool. You can easily find all the steps to configure and upgrade properly in the documentation. Thus, make it a smooth and hassle-free procedure.
  • Parallel Execution and Work Distribution Support System: It is simple to integrate Jenkins with additional tools. Also, the automation tool supports parallel execution, which makes the work distribution easy.

To explore more about Jenkins, visit the official site here.

Introduction to Jira

Jenkins Jira - Jira Logo
Image Source

Introduced in 2002 by the Australian Company Atlassian, Jira is a trusted Software Development Tool used to plan, track issues, and projects management. Jira software is written in Java language and helps track bugs and issues visible in software and Mobile Applications. The demand for the Agile Development methodology by the software companies lead to the expansion of the Jira platform. Currently, the software development tool is available to various non-technical, software development, and IT teams.

Jira also comprises release management features and offers free Open-Source projects for those who meet certain criteria. Also, the Jira software comprises various functionalities and is the best tool to manage, report, track, and resolve bugs and issues in the software.

Key Features of Jira

Jira is a great Project Management tool. It offers a plethora of key features like:

  • Agile Development: It is this fundamental application that allows smooth use of all Scrum boards and Kanban boards feature. Also, it can be used for all methods, like Scrum, Kanban, and hybrid.
  • Reporting: The tool helps provide detailed information in an easy-to-understand format referred to as reports. These reports additionally help gain visibility on issues and bugs present in a software or application.
  • Security System: People who are permitted to work as a team member of the given security level have the access to track a certain bug. Permission scheme and encryption in transit and at rest are default security features in Jira.
  • Roadmaps: This feature enables users to create, handle and visualize stories. They also disclose when the bugs are scheduled to get fixed.
  • Real-time Notification System: It provides email alerts as an issue gets updated. Also, for overdue tasks, the administrator has the choice to send reminders.
  • Dashboard: You can view and customize the dashboard as per the need.

To learn more about Jira, visit the Jira HomePage.

Understanding the Need for Jenkins Jira Integration

Jira is a Software Development Tool, whereas Jenkins is an Open-Source Automation tool. The only purpose behind Jenkins Jira Integration is to create a free, easy, and secure way to connect the servers running behind the firewall. To begin the integration process, all you require is to add more lines that define Pipeline steps to the Jenkins file. As the administrator adds them to the Jenkins, the complete process to build, deploy, and link data to Jira issues will begin.

As a result, you will have access to more visibility on Jira issues, the latest build status, and successful deployments. You can also make use of Jira Query Language (JQL) to search across various Jira issues.

Simplify Data Analysis with Hevo’s No-code Data Pipeline

Hevo Data, a No-code Data Pipeline, helps load data from any data source such as Databases, SaaS applications, Cloud Storage, SDK,s, and Streaming Services and simplifies the ETL process. It supports 100+ Data Sources including 40+ Free Sources such as Jira. It is a 3-step process by just selecting the data source, providing valid credentials, and choosing the destination. Hevo loads the data onto the desired Data Warehouse/destination and enriches the data and transforms it into an analysis-ready form without having to write a single line of code.

Its completely automated pipeline offers data to be delivered in real-time without any loss from source to destination. Its fault-tolerant and scalable architecture ensure that the data is handled in a secure, consistent manner with zero data loss and supports different forms of data. The solutions provided are consistent and work with different BI tools as well.

GET STARTED WITH HEVO FOR FREE

Check out why Hevo is the Best:

  • Secure: Hevo has a fault-tolerant architecture that ensures that the data is handled securely and consistently with zero data loss.
  • Schema Management: Hevo takes away the tedious task of schema management & automatically detects the schema of incoming data and maps it to the destination schema.
  • Minimal Learning: Hevo, with its simple and interactive UI, is extremely simple for new customers to work on and perform operations.
  • Hevo Is Built To Scale: As the number of sources and the volume of your data grows, Hevo scales horizontally, handling millions of records per minute with very little latency.
  • Incremental Data Load: Hevo allows the transfer of data that has been modified in real-time. This ensures efficient utilization of bandwidth on both ends.
  • Live Support: The Hevo team is available round the clock to extend exceptional support to its customers through chat, email, and support calls.
  • Live Monitoring: Hevo allows you to monitor the data flow and check where your data is at a particular point in time.

Simplify your Data Analysis with Hevo today! 

SIGN UP HERE FOR A 14-DAY FREE TRIAL!

Steps to Set up Jenkins Jira Integration

Before you begin setting up Jenkins Jira Integration, here are a few points to keep in mind.

  • Remember, you have the right to be the Jira Cloud site’s administrator.
  • Also, as an Admin to Jenkins, you have the authority to install, update and delete plugins.
  • For deployment information, the team must add issue keys, such as FUSE-123, as part of their commit messages. However, for building information, the team must add a branch name.
  • Also, make sure that you have the authority to edit Jenkinsfile in your source code/repo.

Follow the steps below to successfully set up your Jenkins Jira Integration using Jira Cloud Plugin:

Step 1: Create OAuth Credentials in Jira for Jenkins

  • Go to Jira home and choose Apps from Jira Settings.
  • Choose OAuth credentials and Create credentials.
  • Now, fill in the following information:
Jenkins Jira - Create OAuth Credentials
Image Source

Step 2: Install the Jira Cloud Plugin

  • Sign in to the Jenkins server and find the Plugin Manager.
  • Click on the ‘Available‘ tab and type the plugin name ‘Atlassian Jira Software Cloud‘ in the search box.
  • Now, install it.

Step 3: Add the OAuth Credentials in Jenkins

  • Sign in to Jenkins and navigate to Manage Jenkins. Select Configure System screen and search for the Jira Software Cloud integration section.
  • From this section, choose Add Jira Cloud Site, then Jira Cloud Site
  • A pop-up will appear displaying the Site name, ClientID, and Secret fields on your screen.
  • Now, fill in the below-listed details:
    • Jira Cloud site URL under the site name field. For instance, yourcompany.atlassian.net
    • Visit the OAuth credentials screen and copy the value from the Client ID column for the Client ID field.
    • For the secret field, choose to add and click Jenkins.
      • Kind: Choose Secret text
      • Secret: Add the OAuth credentials screen from the secret column
      • Description: Add a unique and helpful description
  • Now, select the new secret created recently.
  1. To make sure valid credentials are in use for your Jira site, choose Test Connection.
  2. Now, press Save.

Steps to Work with Jenkins Jira Integration

Now that you have learned the steps to set up Jenkins Jira Integration, in this section, you will understand how to work and load your data into Jenkins Jira Pipeline. So, follow the steps below:

Step 1: Build Jenkins Jira Snippets

  • Navigate to Jenkins’s specific pipelines.
  • Choose Pipeline Syntax from the left-hand menu.
  • A dialog box will appear. Under the snippet generator section, a dropdown list of Sample Steps will be available. Fill in the details and choose jiraSendDeploymentInfo or jiraSendBuildInfo, or checkGatingStatus.
  • Choose Generate Pipeline Script and paste the copied output in your Jenkinsfile. Make sure to place it where you are willing to notify Jira.

Step 2: Load Build Data to Jenkins Jira Pipeline

Have a look at an example snippet of the ‘Build’ stage installation in a Jenkinsfile. Once you have added the extra in the pipeline and it is on the run, all the build information will be posted at the branch name to your Jira Cloud site. In case of a Jira issue key in the branch name, such as TEST-123, it will send back the data to Jira.

stage('Build') {
   steps {
       echo 'Building...'
   }
   post {
       always {
           jiraSendBuildInfo site: '<sitename>.atlassian.net'
       }
   }
}

Step 3: Load Deployment Data to Jenkins Jira Pipeline

Check out the example snippet of a stage that performs when any change is made to the master branch. Make use of the post step to load deployment data to Jira and related issues. Make sure to set the environmentId, environmentName, and environmentType wherever you are willing to notify Jira. To add more context to deployment progress and result, include State and ServiceIds.

stage('Deploy - Production') {
   when {
       branch 'master'
   }
   steps {
       echo 'Deploying to Production from master...'
   }
   post {
       always {
           jiraSendDeploymentInfo site: '<sitename>.atlassian.net', environmentId: 'us-prod-1', environmentName: 'us-prod-1', environmentType: 'production'
       }
   }
}

Step 4: Add Environment and Service Details for Jira

Site, Environment, and Service details work as parameters to build environment variables. To add the same in your Jenkins pipeline, follow the below-listed steps:

  • Visit Jenkins and choose a Pipeline.
  • Choose Configure > General tab.
  • Make sure to check if the project is parameterized.
  • Now, go to the Add Parameter and select the String parameter.
  • Put the following details for your parameter – Name, Default Value, and Description.
  • Now, click on Save.

Step 5: Fetch Keys using Custom Logic

As per the default settings, the plugin releases issue keys from all the commit messages present in the build’s change log section. You may override this behavior to make changes as per your mind. Also, later send the list issue keys in the form of issueKeys parameter.

jiraSendDeploymentInfo site: '<sitename>.xyz.net', 
environmentId: 'us-prod1', environmentName: 'us-prod2', 
environmentType: 'production', issueKeys: ['DEV-001', 'DEV-002']

Step 6: View Development Data in Jira

When committing or merging a Pull Request in your SCM tool (Bitbucket or GitHub) at the time of installation, it must run as per the specified Jenkins pipeline for that repo. On the right-hand side, you will find all the build and deployment information in the issue detail.

Jenkins Jira - View Development Data
Image Source

Well Done!! You have finally learned the key steps to set up and work with Jenkins Jira Integration.

Conclusion

In this article, you gained a basic understanding of Jenkins and Jira. You learned their key features and understood the need to integrate Jenkins Jira. In addition, you understood the simple yet detailed steps to set up Jenkins Jira Integration. Moreover, you also learned the steps to load and view your data using Jenkins Jira Cloud Plugin.

However, extracting complex data from a diverse set of data sources like CRMs, Project management Tools, Streaming Services, Marketing Platforms can be quite challenging. This is where a simpler alternative like Hevo can save your day! 

Hevo Data is a No-Code Data Pipeline that offers a faster way to move data from 100+ Data Sources including 40+ Free Sources such as Jira, into your Data Warehouse to be visualized in a BI tool. Hevo is fully automated and hence does not require you to code.

VISIT OUR WEBSITE TO EXPLORE HEVO

Want to take Hevo for a spin?

SIGN UP and experience the feature-rich Hevo suite first hand. You can also have a look at the unbeatable pricing that will help you choose the right plan for your business needs.

Share your experience of setting up Jenkins Jira Integration in the comments section below!

No-Code Data Pipeline For Your Data Warehouse