Research of Industry Use Cases of Jenkins

Simran Shrivas
9 min readMar 12, 2021

Hello Learner!!😎✍️✍️

About Jenkins

Jenkins 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.

Jenkins is a popular self-contained, open-source automation server to perform continuous integration and build automation. Its elementary functionality is executing a predefined list of phases or jobs. In other words, every change in a repository triggers a pipeline of jobs that evaluates and executes different tasks to accomplish what has been previously defined.

Each phase is monitored and allows you to stop the entire process and the change will be reported to the user by Jenkins. In large companies, it is common for multiple teams to work on the same project without knowing what the other teams are doing on the same code base. Those changes can create bugs that will only be revealed when both codes are integrated into the same branch. Since Jenkins can run its predefined jobs for every commit, it will be able to detect and notify developers that something is not right and where it is.

Thousands of add-ons can be integrated with Jenkins, they provide support for different types of build, version control systems, automation, and more. It can be installed through native system packages, Docker, or be run by any machine with a Java environment installed.

Jenkins is often used for building projects; running tests to spot bugs, analyze static code, and deploying. It also executes repetitive tasks, saves time, and optimizes developing processes.

Beginning with the second version, Jenkins introduced Pipelines, a different way to programmatically define a project build workflow. Before pipelines, the CI description was defined and stored outside the repository — it was designed to evaluate — now, with Pipelines, CI files are present in project source code. The file describes the workflow through a language that can be used to create different jobs in sequence or parallel.

Jenkins use cases

Let’s take a look at some of the main scenarios Jenkins plays a critical part in.

Continuous Integration (CI)

Continuous integration is a practice that forces developers to frequently integrate their code into a central repository. Instead of building out new features to the end without any quality measurement, every change is tested against the central repository to anticipate errors.

Every developer commits daily to a shared mainline and every commit triggers an automated process to build and test. If building or testing fails it can be detected and fixed within minutes without compromising the whole structure, workflow, and project. In that way, it is possible to isolate problems, solving them faster, and provide higher-quality products.

Continuous Delivery (CD)

Continuous delivery is the ability to make changes of all types — such as new features, configuration changes, error fixes, experiments — into production safely and efficiently using short work cycles.

The main goal is continuous delivery is to make deployments predictable as routine activities that can be achieved upon request. To be successful, the code needs to always be in a deployable state even when there is a scenario with lots of developers working and making changes daily. All of the code progress and changes are delivered in a nonstop way with high quality and low risks. The result is one or more artifacts that can be deployed to production.

Continuous Deployment (CD)

Continuous deployment, also known as continuous implementation, is an advanced stage of continuous delivery that the automation process does not end at the delivery stage. In this methodology, every change that is validated at the automatic testing stage is later implemented at the production stage.

The fail-fast strategy is always of the utmost importance when deploying to production. Since every change is deployed to production, it is possible to identify edge cases and unexpected behaviors that would be very hard to identify with automated tests. To fully take advantage of continuous deployment, it is important to have solid logging technology that allows you to identify the increasing error count on newer versions. Besides, a trustworthy orchestration technology like Kubernetes will allow the new version to slowly be deployed to users until the full rollout or an incident is detected and the version is canceled.

Automation

As a job executor, Jenkins can be used to automate repetitive tasks like backup/restore databases, turn on or turn off machines, collect statistics about service and other tasks. Since every job can be scheduled, repetitive tasks can have the desired time interval (like once a day, once a week, every fifth day of the month, and so forth).

Who uses Jenkins?

  • COMPANIES: 2833 companies reportedly use Jenkins in their tech stacks, including Facebook, Netflix, and Udemy.
  • DEVELOPERS: 33145 developers on StackShare have stated that they use Jenkins.
  • Jenkins Integrations: Slack, Datadog, BrowserStack, Azure DevOps, and SonarQube are some of the popular tools that integrate with Jenkins. Here’s a list of all 144 tools that integrate with Jenkins.
  • We have data on 59,079 companies that use Jenkins. The companies using Jenkins are most often found in the United States and the Computer Software industry. Jenkins is most often used by companies with 10–50 employees and 1M-10M dollars in revenue. Our data for Jenkins usage goes back as far as 5 years and 1 month. If you’re interested in the companies that use Jenkins, you may want to check out Google Analytics and ASP.NET as well.

Top Industries that use Jenkins

Top Countries that use Jenkins

Distribution of companies that use Jenkins based on company size (Employees)

Distribution of companies that use Jenkins based on company size (Revenue)

How Does Jenkins Work?

Jenkins triggers a build upon every commit to the source code repository, typically to a development branch.

Jenkins can be configured to run an initial suite of unit tests to ensure that the commit did not “break the build”. If the tests do not pass, the developer can be immediately notified to take corrective action. This puts to rest the question of “Who broke to build?” as it is easy to determine which commit caused the build to fail. If all the unit tests pass, then the build pipeline can proceed to the next phase with integration tests which typically take longer to run.

Jenkins provides the ability to run a build in parallel across multiple machines to minimize the total amount of time it takes to complete many of these activities. Finally, Jenkins can deploy the build to an environment that allows for any needed user acceptance testing (UAT) before releasing it into production. These simplified steps encompass the spirit of a continuous integration (CI) environment.

To reach the holy grail of continuous delivery (CD), these UAT tests can be automated as well using a tool like Selenium, where if those tests pass, the code can be merged into the master branch where a “golden” build can be created and deployed directly into production without manual intervention. Companies that have reached the continuous delivery milestone can deploy to production many times a day, such as Amazon, Facebook, and Google.

Jenkins at Netflix

Netflix is the birthplace of open-source Spinnaker, but it is also a perennial Jenkins user. As early cloud adopters, Netflix teams quickly learned to automate build and test processes, and heavily leveraged Jenkins, evolving from “a single massive Jenkins master in our datacenter, to running 25 Jenkins masters in AWS” as of 2016.

Jenkins changed the software development and delivery game by freeing teams from rigid, inflexible build processes and moving them into continuous integration. With test and build automation, “it works on my laptop” became a moot point. A critical leap for software-centric businesses like Netflix, this ignited a spark of the possible.

As Jenkins became an open-source standard, engineers leveraged it to prove the power of software innovation, and the difference that velocity makes to improving user experiences and business outcomes. This approachable automation still works, and most of us still use it, over 15 years after its first release.

Over time, Netflix teams found it increasingly difficult to meet velocity, performance, and reliability demands when deploying their code to AWS with Jenkins alone. Too much technical debt had accumulated in their Jenkins and its scripts, and developers, feeling the anxiety, craved more deployment automation features. So, Netflix began to build the tooling that evolved into today’s Spinnaker.

Spinnaker & Delegation

Much like what Jenkins did for testing and integration, Spinnaker has done for release automation. It allows us to stitch together the steps required to safely deliver updates and features to production; it delegates pipeline stages to systems across the toolchain, from build and test to monitoring, compliance, and more. Spinnaker increasingly uses its plugin framework to integrate tools. However, its foundational Jenkins integration exists natively, using triggers to pick up artifacts from it, and stages to delegate tasks to it. With property files to pass data for use in variables further down the pipeline and concepts like Jenkins’ “unstable build” built-in, Spinnaker can leverage the power of existing Jenkins assets.

Then, out of the box, Spinnaker adds the “secret sauce” pioneered by companies like Netflix to deliver the software experiences users now expect. With Spinnaker, you can skip changing approval meetings by adding manual judgments to pipelines where human decisions are required. You can perform hotfixes with confidence and limit the blast radius of experiments by using automated canary analysis or your choice of deployment strategy. Enjoy these features when deploying code or functions to any cloud and/or Kubernetes, without maintaining custom scripts to architect pipelines.

As a developer, I found that I had the best experience using Jenkins for less complicated jobs and pipelines; even with much of the process defined as code, I didn’t always have enough context to fully understand the progression of the artifact or debug. Since joining the Spinnaker community, I’ve learned to rely on Jenkins's stages for discrete steps like applying a Chef cookbook or signaling a Puppet run. I can manage these steps from Spinnaker, where, along with deployment strategies and native infrastructure dashboards, I can also experiment with data visualization using tools like SumoLogic, and even run terraform code.

It’s simple to get started with the integration. I use Spinnaker’s Halyard tool to add my Jenkins master and boom:

If Jenkins is a Swiss Army knife, Spinnaker is a magnetic knife strip. Their interoperability story is the story of continuous delivery’s evolution, and allows us to use the right tool for the right job:

  • Jenkins: not only do I have all the logic and capability needed to perform your testing, integration, and deployment steps, I’m also an incredibly flexible tool with a plugin for every special need of every development team under the sun. I’m game for any job!
  • Spinnaker: not only can I give your Jenkins jobs a context-rich home, but I also delegate to all your other SDLC tools, and visualize the status and output of each. My fancy automation around deployment verifications, windows, and strategies makes developers happy and productive!

Thanks for Reading !!📃

🔰 Keep Learning !! Keep Sharing !! 🔰

--

--