Popular Use Cases of Jenkins
Jenkins is one of the most popular Continuous Integration (CI) and Continuous Delivery (CD) tool. Jenkins is an Open Source build written in Java. Jenkins can be used in automation of any task related to build, test and deployment of an application. Please find some of popular use cases in Jenkins.
Some Popular Use Cases of Jenkins
Use Case 1: Continuous Integration
If you are working for a big application and your application needs to run lots of integration and code quality check then if every developer have to perform tests on their local environment before merging the code in master branch which is time consuming for each developer. However, if we have a centralized integration server where developer can test their code and create the build. It will be definitely easier for them, they don’t need to wait until build completes in the local environment. In case of build failure CI server can notify to the developer and they can do the requires fixing. The benefit of executing the CI builds helps developer to find out the error before committing the buggy code into the master branch, it can break the other developers work. Also, it may create an issue if someone deploys the faulty build in higher environment. Jenkins can be used as a Continuous Integration server where we can trigger the build as soon as developer commits the code into feature branch.
Use Case 2: Continuous Deployment / Continuous Delivery
In a typical scenario, Developer commits the code in a feature branch in the next step automated Jenkins CI build triggers that perform the Integration test. The Developer now will raise a Pull Request(PR) for reviewer to validate the changes and once developer got approval in PR they can merge the changes in Master Branch. Now master branch can be used for creating a new build artifact to promote the build into Dev and QA or higher environment. In the next step we can ask QA team to perform the test in QA environment. However, if we will implement automation to validate the build in higher environment, then we don’t need to wait for the QA team to certify the build.
When you have ability to code -> build-> test -> deploy in single pipeline till PROD environment then it is called Continuous Deployment.
However, if you can promote your build until UAT and build is ready for PROD deployment, but you need certain approval and quality check before the PROD deployment and if you are doing PROD deployment manually then it is called Continuous Delivery. So Jenkins can be used for Continuous Deployment in which we can do the PROD deployment as soon as developer push the changes into the master branch.
Use Case 3: Task automation
Let’s understand another scenario where you can use Jenkins in task automation.
If you are working on multiple environment, then we need to perform some installation or upgrade on all the environment. What if your installation and upgrade require 100+ steps to perform the activity, then it will be error prone if you are doing it manually. What if you write down all the steps in Jenkins to perform the activity, then it will be less time consuming and also you can do that installation or upgrade without any issue.
More details in Jenkins official documentation : https://www.jenkins.io/doc/