How to perform Notification, Reporting and Code Analysis

Last updated on May 28 2022
Uma Kulkarni

Table of Contents

How to perform Notification, Reporting and Code Analysis

Jenkins – Notification

Jenkins comes with an out of box facility to feature an email notification for a build project.

Step 1 − Configuring an SMTP server. Goto Manage Jenkins → Configure System. Go to the E-mail notification section and enter the required SMTP server and user email-suffix details.

How to perform Notification, Reporting and Code Analysis
How to perform Notification, Reporting and Code Analysis

Step 2 − Configure the recipients within the Jenkins project – When you configure any Jenkins build project, right at the end is the ability to feature recipients who would get email notifications for unstable or broken builds. Then click on the Save button.

How to perform Notification, Reporting and Code Analysis
How to perform Notification, Reporting and Code Analysis

Apart from the default, there are also notification plugin’s available within the market. An example is the notification plugin from Tikal Knowledge which allows sending Job Status notifications in JSON and XML formats. This plugin enables end-points to be configured as shown below.

How to perform Notification, Reporting and Code Analysis
How to perform Notification, Reporting and Code Analysis

Here are the details of each option −

• “Format” − This is the notification payload format which can either be JSON or XML.
• “Protocol” − protocol to use for sending notification messages, HTTP, TCP or UDP.
• “Event” − The job events that trigger notifications: Job Started, Job Completed, Job Finalized or All Events (the default option).
• “URL” − URL to send notifications to. It takes the form of “http://host” for HTTP protocol, and “host:port” for TCP and UDP protocols.
• “Timeout” − Timeout in milliseconds for sending notification request, 30 seconds by default.

Jenkins – Reporting

As demonstrated within the earlier section, there are many reporting plugins available with the simplest one being the reports available for jUnit tests.

Within the Post-build action for any job, you can define the reports to be created. After the builds are complete, the Test Results option will be available for further drill-down.

How to perform Notification, Reporting and Code Analysis
How to perform Notification, Reporting and Code Analysis

Jenkins – Code Analysis

 

Jenkins has a host of Code Analysis plugin. The various plugins can be found at https://wiki.jenkins-ci.org/display/JENKINS/Static+Code+Analysis+Plugins

How to perform Notification, Reporting and Code Analysis
How to perform Notification, Reporting and Code Analysis

This plugin provides utilities for the static code analysis plugins. Jenkins can parse the results file from various Code Analysis tools such as CheckStyle, FindBugs, PMD etc. For each corresponding code analysis tool, a plugin in Jenkins needs to be installed.

Feature optionally the feature-on plugin Static Analysis Collector is available that combines the individual results of these plugins into a single trend graph and view.

The plugins can provide information such as

• The total number of warnings in a job
• A showing of the new and fixed warnings of a build
• Trend Reports showing the number of warnings per build
• Overview of the found warnings per module, package, category, or type
• Detailed reports of the found warnings optionally filtered by severity (or new and fixed)

So, this brings us to the end of blog. This Tecklearn ‘How to perform Notification, Reporting and Code Analysis’ blog helps you with commonly asked questions if you are looking out for a job in DevOps. If you wish to learn Jenkins and build a career in DevOps domain, then check out our interactive, Continuous Integration with Jenkins Training, that comes with 24*7 support to guide you throughout your learning period. Please find the link for course details:

Continuous Integration with Jenkins

Continuous Integration with Jenkins Training

About the Course

Tecklearn has specially designed this Continuous Integration with Jenkins Training Course to advance your skills for a successful career in this domain. This course helps you learn server automation, continuous integration, build and configuration tools, Jenkins master-slave architecture, different types of plugins, implementing automated testing and more through hands-on projects and exercises. Upon completion of this online training, you will hold a solid understanding and hands-on experience with Jenkins.

Why Should you take Continuous Integration with Jenkins Training?

• Average salary of Jenkins Professional is $110k (Indeed.com Salary Data)
• Jenkins is an open-source automation server which enables developers around the world to reliably build, test, and deploy their software.

What you will Learn in this Course?

Introduction to DevOps

• What is Software Development
• Software Development Life Cycle
• Why DevOps?
• What is DevOps?
• DevOps Lifecycle
• DevOps Tools
• Benefits of DevOps
• How DevOps is related to Agile Delivery
• DevOps Implementation

Continuous Integration with Jenkins

• Introduction to Continuous Integration and Jenkins
• Jenkins Management
• Jenkins Master Slave Architecture
• Tools Required for CI
• Understanding CI/CD Pipelines
• Creating an end-to-end automated CI/CD Pipeline
• Jenkins Versions

0 responses on "How to perform Notification, Reporting and Code Analysis"

Leave a Message

Your email address will not be published. Required fields are marked *