Introduction to Jenkins
Jenkins in a nutshell
What is Jenkins?
Jenkins is a java application and it is platform-independent. So it does not require any specific platform you can use Jenkins the same way whether you are on Windows or you are on Linux. Jenkins is used for continuous integration and continuous delivery.
Why Jenkins?
When we are working in a team we have different developers who develop the code and they keep on working on changing or enhancing the code and as the developer works on his own machine and he changes the code he will check the code into some shared repository. This repository can be git, bitbucket, or TFS. Throughout the entire day, there are many developers who are changing the code and checking the code repository. So at the end of the day when you have a build let’s suppose there is some bug introduced in any of the code and now the build failed. In this kind of scenario, it will be very difficult to identify what exact code failed. So you have to go back and check-in all the code that was created that day and there will be a lot of confusion.
Jenkins's responsibility is as soon as any developer commits a code in the shared repository and it will take the latest code and trigger a build. The build notification will be sent out so if there any problem with the build or there is any error you will get notified as soon as the build gets triggered and the build completes. Therefore we can check that if there is an issue due to any commit and easily identified where is the issue. We can reverse that and it will save a lot of time in finding out what code gives an error.
Also when the build is successful we can also integrate our unit tests or acceptance test or performance test along with the build as a post-build action in Jenkins. And it will be automated as soon as the build gets deployed. Jenkins will trigger some test cases or some testing which will be automated and it will send out a report back to us.
Continuous-integration?
If he builds was successful and there was no exception but due to the changes in the code, there was something that broke in the application. So we will come to know instantly there is some break due to this code and we can troubleshoot it. So you can see how efficient and powerful the entire system can be and this is called “continuous integration”.
Continuous delivery?
As soon as there is any change in the code Jenkins builds the system and it will trigger some test cases or some testing which will be automated. And it will send out a report back to us. This entire cycle is repeating when there is a change in the code this process called “continuous delivery”.
Jenkins Pipeline?
It is a suite of plugins that supports implementing and integrating continuous delivery pipelines into Jenkins.
Advantages
Platform-independent
Automates it all integration work
Easy to install and use
Requires little maintenance
Disadvantages
So many plugins
The framework cannot be customized beyond a certain extent.
Does not allow the tailoring of the workflow processes, managing security changes, etc.