First things first: Do I need Jenkins? What are its requirements?

Jenkins eliminates the need for someone to manually run tests on committed code and start up the deployment process. This issue becomes imperative in larger projects, where developers work asynchronously and stakeholders can’t rely on an engineer being available at all times to verify that nothing is breaking the system. Jenkins runs on a server and it helps shorten development and release cycles, while maintaining quality in many aspects, such as code style and quality, integration testing, unit testing, and more.

Although Jenkins does not require high-end specs, one must keep in mind that the many Docker containers required may take up a decent chunk of hard drive space. With more than 1GB RAM, at least 50GB disk space, and a reliable Internet connection one can expect Jenkins to run without trouble for mid-range software development projects. It is advised to run Jenkins on a Docker container, so if you don’t have Docker installed, that’s the first thing you should do. Depending on your server’s OS, there are different steps to follow. The official guide on installing Jenkins is the best place to start, as there are some ports that Jenkins needs to access the multitude of services it provides.

After installing, you’ll see that there are many plugins available, and depending on your project’s needs, you might want to install a particular set. Jenkins being an open-source project, these plugins are developed by the community. Some of the most popular are the Kubernetes plugin (another CI/CD tool, widely used by Google and based on the company’s best practices to handle billions of containers), Jira (a powerful suite developed by Atlassian that helps manage and track software development requirements, user stories, tasks, and sprints), and the Oracle Java SE Development Kit installer, that while popular, the community advises users to instead use a standalone installation of the JDK, as the plugin relies on Oracle’s website, adding a layer of third-party reliability.

The Pipeline

The most important concept in Jenkins is that of the Pipeline, which allows users to write a Jenkinsfile that manages how the software behaves during each tailored process. The pipeline is comprised of several agents or workers that perform sets of actions. Different examples of pipelines can be found on this Github repository.

Jenkins and GitHub

Jenkins can connect to GitHub by using Webhooks; these let Jenkins know when there’s a new testing request, pull request, issue, or even a change in collaborators. Jenkins is then programmed to run a wide variety of steps, either conditional or mandatory, by using shell scripts or making a new pull request on another repository. Guy Salton, from BlazeMeter, wrote a very comprehensible guide on hooking up Jenkins and GitHub.

If Jenkins proves to be too much for your project, there are smaller and simpler CI alternatives that can help keep the code tested and with a minimal amount of bugs. Two of the most popular tools of this kind are Travis and CircleCI, which run on the cloud and are very easy to set up. Both offer free and paid plans.

Source: https://www.jenkins.io/doc/book/using/

Latest Posts