hands-on lab

Create a Jenkins CICD Pipeline to Publish Build Results into Jira

Intermediate
2h
947
4.5/5
Get guided in a real environmentPractice with a step-by-step scenario in a real, provisioned environment.
Learn and validateUse validations to check your solutions every step of the way.
See resultsTrack your knowledge and monitor your progress.
Lab description

Lab Overview

Integrating Jenkins and Jira together provides you with a solution that can be used to report issues as they happen for any CICD pipeline build job. Jenkins can be configured to publish any and all build results, artifacts, and/or bugs directly into Jira. DevOps teams can then use Jira to project manage the required fixes necessary to get their applications into production.

In this lab, you will launch a Jenkins and Jira CICD and issue management environment using Docker containers on a provided EC2 instance. You will then configure a Jenkins build pipeline to build, compile, and package a sample Java servlet web application, with the resulting build information being published automatically into Jira. You will then use Jira to observe the details about the Jenkins build just performed.

This lab is aimed at DevOps and CICD practitioners, and, in particular, build and release engineers interested in managing and configuring Jenkins together with Jira for enterprise-grade issue tracking.

Note: To complete this lab, you will be required to generate a trial license on the Atlassian website, which is used to activate the Jira application. This will require you to either have an existing Atlassian user account or create a new Atlassian user account. 

Lab Objectives

Upon completion of this lab, you will be able to:

  • Install and configure a Jenkins and Jira CICD and issue management environment using Docker containers 
  • Configure Jenkins with the Gradle tool to perform the core build and packaging for a sample Java servlet web application
  • Configure Jenkins with the Jira Pipeline Steps plugin for automated issue management 
  • Create and set up a Jenkins build pipeline using a Jenkinsfile stored within a GitHub repo
  • Kickoff a Jenkins build and review the build results
  • Use the Jira administration web console to manage the issues raised automatically by the Jenkins pipeline build

You should:

  • Be comfortable with SSH to remotely administer a Linux-based server
  • Be comfortable with basic Linux administration

Lab Environment

This lab will start with the following AWS resources being provisioned automatically for you:

  • A single EC2 instance, named cicd.platform.instance, which will have a public IP address attached

To achieve the lab end state, you will be walked through the process of:

  • SSHing into the EC2 instance, named cicd.platform.instance
    • Use Docker Compose to launch the following Docker containers:
      • Jenkins
      • Jira
      • Socat
  • Using a browser, administer and configure Jenkins - installing the required plugins. Connectivity to Jenkins will be done via the cicd.platform.instance Public IP address 
  • Using a browser, administer and configure Jira. Connectivity to Jira will be done via the cicd.platform.instance Public IP address 
  • Create a Jenkins build pipeline and configure it to build a sample Java servlet web application hosted on GitHub
  • Execute the Jenkins build pipeline and confirm that it has completed successfully, registering a new Jira ticket automatically, and attaching the Gradle build log file
  • Use the Jira administration console to manage the ticket raised by the Jenkins pipeline build process

Updates

December 30th, 2022 - Updated lab to use EC2 Instance Connect

August 31st, 2020 - Updated screenshots for the new EC2 user interface

Environment before
Environment after
About the author
Avatar
Jeremy Cook
Content Lead Architect
Students
159,312
Labs
80
Courses
108
Learning paths
212

Jeremy is a Content Lead Architect and DevOps SME here at Cloud Academy where he specializes in developing DevOps technical training documentation.

He has a strong background in software engineering, and has been coding with various languages, frameworks, and systems for the past 25+ years. In recent times, Jeremy has been focused on DevOps, Cloud (AWS, Azure, GCP), Security, Kubernetes, and Machine Learning.

Jeremy holds professional certifications for AWS, Azure, GCP, Terraform, Kubernetes (CKA, CKAD, CKS).

Lab steps
Logging In to the Amazon Web Services Console
Connecting to an EC2 Instance Using Amazon EC2 Instance Connect
Launch Jenkins and Jira Docker Containers
Log in to Jira and Complete Default Installation
Enable Jira Issue Attachments
Log in to Jenkins and Complete the Default Installation
Install and Configure Jira and Gradle Plugins
Create and Execute Pipeline Build Job
Review New Jira Project Issue