J For JENKINS…!

Niharika Dhanik
5 min readJul 27, 2021

If A for AI (Artificial intelligence) and B for Big Data then J for Jenkins..!

Well, as a technical guy, the alphabet series have been slightly modified for us. In this blog, I will be unfolding some concepts and use cases of Jenkins. So let’s hop on this train and explore it.

What Is Jenkins —

Jenkins is an open-source automation tool written in Java with plugins built for Continuous Integration purposes. Jenkins is used to build and test your software projects continuously making it easier for developers to integrate changes to the project, and making it easier for users to obtain a fresh build. It is a free and open source automation server. It helps automate the parts of software development related to building, testing, and deploying, facilitating continuous integration and continuous delivery. It is a server-based system that runs in servlet containers such as Apache Tomcat.

Builds—

Builds can be triggered by various means, for example:

  • a webhook that gets triggered upon pushed commits in a version control system
  • scheduling via a cron-like mechanism
  • requesting a specific build URL.
  • after the other builds in the queue have completed
  • invoked by other builds

Plugins —

Plugins have been released for Jenkins that extend its use to projects written in languages other than java. Plugins are available for integrating Jenkins with most version control systems and bug databases. Many build tools are supported via their respective plugins. Plugins can also change the way Jenkins looks or add new functionality. There are a set of plugins dedicated for the purpose of unit testing that generate test reports in various formats and automated testing that supports automated tests. Builds can generate test reports in various formats supported by plugins (JUnit support is currently bundled) and Jenkins can display the reports and generate trends and render them in the GUI.

Triggers —

Triggers define what causes a Jenkins job to start building. You can also use Postman or Github webhook to trigger the job. It means that it build triggers remotely. We can also see the build result as a success in console output. So, in this way, we can trigger our Jenkins build job via a remote URL.

What is CI/CD —

CI/CD is a method to frequently deliver apps to customers by introducing automation into the stages of app development. The main concepts attributed to CI/CD are Continuous Integration, Continuous Delivery/Deployment. CI means new code changes to an app are regularly built, tested, and merged to a shared repository. It’s a solution to the problem of having too many branches of an app in development at once that might conflict with each other.

The “CD” in CI/CD refers to continuous delivery and/or continuous deployment, which are related concepts that sometimes get used interchangeably. Both are about automating further stages of the pipeline, but they’re sometimes used separately to illustrate just how much automation is happening. Continuous delivery usually means a developer’s changes to an application are automatically bug tested and uploaded to a repository (like GitHub or a container registry), where they can then be deployed to a live production environment by the operations team. It’s an answer to the problem of poor visibility and communication between dev and business teams.

Use-cases of Jenkins —

The broad spectrum use-cases of Jenkins are mentioned below:

Android is attractive to a number of developers, but it does bring it’s 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 true continuous delivery pipeline, sending builds to an alpha channel in Google Play for release or further testing.

BitBucket Server is a Git repository management solution designed for professional teams. It’s part of the Atlassian product family along with Jira, Confluence, and many more tools designed to help teams unleash their full potential. To integrate it with Jenkins, you can install the Bitbucket Server integration for Jenkins plugin. This plugin, which is built and supported by Atlassian, is the easiest way to connect these two tools. It features:

  • Support for Multibranch Pipeline, Jenkins Freestyle, and Pipeline project types
  • Automatic webhook creation in a Bitbucket Server repo when a Jenkins job is saved
  • Quick selection of Bitbucket Server projects and repos for a Jenkins job through a dropdown
  • The ability to automatically send build statuses to Bitbucket Server
  • Cloning from Bitbucket Server Smart Mirrors

Integration with Languages like C / C++ / Python / Java / Ruby / PHP. It supports building Java projects since its inception, and for a reason! It’s both the language Jenkins is written in, plus the language in use by many. If you want to build a Java project, there are a bunch of different options. The most typical ones nowadays are generally Apache Maven, or Gradle. Many of the plugins referenced (right) can be used to integrate with PHP projects, but may first need to be configured the create appropriately formatted files when working with PHP projects. Python doesn’t need a “build” per se. Python projects can still benefit greatly from using Jenkins for continuous integration and delivery. Tasks such as executing RSpec or Cucumber, generating documentation, running code analysis tools and deploying Ruby software can all be done through Jenkins

Docker combined with Jenkins, together can bring improved speed and consistency to your automation tasks.

GitHub plugin on 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 which will hit your Jenkins instance every time a change is pushed to GitHub.

Embedded Software in association with 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. These command line tools can be invoked directly, assuming the build agent being used has the appropriate environment set up.

Thank you!!

--

--