Jenkins and Its Industrial Use cases

What is Jenkins?

Jenkins is a self-contained, open-source automation server that can be used to automate all sorts of tasks related to building, testing, and delivering or deploying software.

Jenkins is an automation server that is written in Java. It is used in automating those parts of software development which do not require human intervention. It is used for continuous integration and providing technical aspects for the facilitation of continuous delivery. Jenkins is usually installed on the server where the central build takes place. Continuous integration ensures frequent builds by developers. The usually followed practice ensures that as soon as the code commit is done, a build is triggered.

Uses of Jenkins

  • Jenkins lowers the Effort of repeated coding — With the uses of Jenkins, one can convert a command prompt code into a GUI button click. This can be done by wrapping up the script as a Jenkins job. Parameterized Jenkins jobs can be created for customization or to take user input. Thus, hundreds of lines of code writing can be saved.
  • Integration of Individual Jobs — Jenkins jobs are usually small tools. They serve small purposes and are quite simple. Jenkins provides a pipeline plugin using which multiple jobs can be combined. Pipelining provides such a benefit that Linux users can understand more than anyone. Both sequential or parallel combination is possible.
  • Synchronization with Slack — A large team uses a centralized platform for communication. Slack is one of the most popular platforms. Slack integration can be done to Jenkins and thus communication such as activities that have been triggered, its time, users name, results etc. can be shared with other people.
  • Effortless Auditing — Jenkins jobs, when run, capture console output from stdout as well as stderr. Troubleshooting with the uses of Jenkins is also very clear. For performance tuning each individual job, run timing can be measured and the slowest step can be identified using the Time stamper plugin.
  • Greater data support for project management — For project management, each activity is wrapped as a Jenkins job. For each Jenkins job, success or failure can be identified, and job completion time can be measured.
  • Manual Tests option — Sometimes things work great locally but fail when pushed on a central system. This happens because, by the time they push, things change. Continuous Integration tests the code against the current state of a code base and is done in the production-like environment.
  • Increased Code Coverage — CI servers such as Jenkins can check code for test coverage. Tests increases code coverage. This inspires transparency and accountability in team members. Results of tests are displayed on the build pipeline which ensures team members follow required guild lines. Code coverage similar to code review ensures that testing is a transparent process among team members.
  • Code deployment to Production — Jenkins or another CI system can deploy code to staging or production automatically if all the tests written for the same within a specific feature or release branch are green. This is formally known as Continuous Deployment as well. Changes before a merge activity can be made visible too. This can be done in a dynamic staging environment, and after they are merged it is deployed directly to a central staging system, pre-production system or even a production environment.
  • Avoid Broken Code during shipping — Continuous integration ensures that code coverage is good, it is tested well and only merged when all tests are successful. This makes sure that the master builds are not broken, and no broken code is shipped to a production environment. In case, the master build is broken, such systems can trigger a warning to all developers.
  • Decrease Code Review Time — CI systems such as Jenkins and Version Control System such as Git can communicate with each other and inform the users when a merge request is suitable for merge. This is usually when all the tests are passed, and all other requirements are met. In addition to that, the difference in code coverage can also be reported in the merge request itself. This dramatically reduces the time taken to review a merge request.

Jenkins with GitHub

Build integration

With the help of the Git plugin, Jenkins can easily pull source code from any Git repository that the Jenkins build node can access.

The GitHub plugin extends upon that integration further by providing improved bi-directional integration with GitHub. Allowing you to set up a Service Hook that will hit your Jenkins instance every time a change is pushed to GitHub.

Authenticating with GitHub — Using the GitHub Authentication plugin it is possible to use GitHub’s own authentication scheme for implementing authentication in your Jenkins instance.

Jenkins and Android

Building, Testing & Deploying Android Apps with Jenkins

As one of the predominant mobile platforms, Android is attractive to a number of developers, but it does bring its own set of challenges with it. With an extremely broad set of devices available on the market, building and testing for the matrix of device configurations can be very challenging. With the Android emulator plugin, however, it is possible to build and test on a myriad of emulated devices.

When combined with the Google Play Publisher plugin, Android developers can build a true continuous delivery pipeline, sending builds to an alpha channel in Google Play for release or further testing.

Jenkins and Docker

Combining Jenkins and Docker together can bring improved speed and consistency to your automation tasks. What this offers to Jenkins users is a means to isolate different jobs from one another, quickly clean a job’s workspace or even dynamically deploy or schedule jobs with Docker containers to increase resource utilization and efficiency

Jenkins in the Embedded World

Jenkins is an extensible framework, which can be applied to many areas including embedded software and even hardware development. With proper configuration, Jenkins can be operated with hardware peripherals attached to build agents to accelerate the development of all kinds of embedded use-cases.

Jenkins has plugins for integration with common tools such as GCC, Microsoft Visual Studio, etc. Currently, there are not domain-specific embedded development or electronic design automation tool integrations. Jenkins can however integrate with practically any tool which can provide a command-line interface via its shell/batch scripting integration.

Case Study: Graylog’s DevOps Infrastructure To Support A Complex & Dynamic Platform

For this industry-leading log management platform powering tens of thousands of enterprise installations worldwide, their new build and release manager set out to leverage the power and flexibility of Jenkins’ latest features to enhance their current DevOps environment.

CHALLENGE:

Upgrade Graylog’s Jenkins installation with the latest version to:

  • enable expanded use of infrastructure-as-code
  • ensure quick and straightforward disaster recovery for Jenkins
  • provide visibility for all during the release process

SOLUTION:

A flexible and modern DevOps platform for Graylog.

RESULTS:

  • Maintainability of job improved through infrastructure-as-code
  • Upgrade performance moved from never upgraded to upgrades within minutes
  • Observability of builds increased through Blue Ocean UI
  • A scalable infrastructure to support 40,000 enterprise installations and thousands of IT professionals worldwide

Thank you