Jenkins



Jenkins

Jenkins is an open source automation tool written in java with plugins built for continuous integration process.It is used to build and test software projects continuously making it easier for developers to integrate changes to projects.It is used to build and test our project continuously.

Jenkins is used for implementing CI/CD pipelines. These pipelines automate the testing and integrate the changes from other branches to the main branch .

Jenkins work as -
  • Developers make the necessary changes and commit them to the source code.
  • The repository is continuously checked by Jenkins for any changes.
  • If the build process is successful, an executable is generated.
  • If no issues are found, it gets deployed to the production server

Once the software is rolled out in the market, it is constantly under the scanner, meaning that the product is bound to receive some feature update or a certain version upgrade .
This entire process of integrating changes, testing, and releasing is termed as ‘Continuous Integration’ and ‘Continuous Development’.
Jenkins followed a CI/CD pipeline(Steps under CI/CD) -
CI :
  • Push code from local to a git repo.
  • Create a build pipleline that will take our code from repo as input and create a docker image and pushed it to Azure container registry.

CD :
  • we need to create a release pipeline that will take docker image from the Azure container registry and create Azure container instances.

Azure Container Registry is a hosting platform for docker image.Such images can be used for container based deployment in any platform.
Code Flow with Continuous Integration

Problems Without Continuous Integration
Suppose there is a developer who is waiting for a long time inorder to get the test result of the deployed code.1st the entire source code of the application will built and than only it will be deployed to the test server for testing.It takes a lot of time .So, developers have to wait for a long time inorder to get the test result.
Since,entire code of application is 1st built and than it is tested.So, if their is any bug in the code ,developers have to go through entire source code of application,So, it is a headache for developers as the code that was built successfully but in testing there was certain bugs. So,he/she has to go through the entire source code to detect and remove that bug. Here, locating and fixing the bug is a very time-taking process.Developers have to waste a lot of time in locating and fixing the bug than implementing any new feature.

Code mechanism with COntinuous Integration
If there are multiple developers working on any code and any one of them makes any commit to the source code ,the code will be pulled from the repository.It will be built,tested and deploy.So, here is the advantage ,as the developers here will be able to check which commit Id has causes bug and can be treated there itself.So,there is no need to go through entire code of application they just need the particular commit which caused bug. So, this way locating and fixing of bug becomes very easy.

S.NO Before Continuous IntegrationAfter Continuous Integration
1. The entire source code was built and than tested Every commit made in source code is built and tested
2. Developers have to wait for test resultsTest results of every commit made in source code is known
3. No feedbackFeedback is there
.


CI/CD Pipeline

CI - Continuous Integration
CD - Continuous Delivery/Continuous Deployment
The process involved in a project in an orgranisation are -
  • Dev
  • Testing
  • Deployment/Release

Continuous Integration -This process happens mostly in Dev Phase.In this process, team members integrate their code or their work in a shared repository and this process is best achieve by some source code management tool like - Git.So,they integrate their work on a regular basis.Members in dev team will integrate their work and check in the shared repository and then this check-in is than followed and validated by an automated build and automated unit test.
This process expands from dev phase to some parts of testing phase as most of the test are unit test which are automated at the dev end.
Under this phase, we run some unit test.

Continuous Delivery - After CI process ,there is requirement of deployment in an environment that can be a QA or can be a staging environment and than some automated test are run to ensure that the code is now ready to be deployed.Goal of this process is always to make sure that build is always in a deployable state or a deployment ready state.
Here occures deployment in pre-prod or staging environment not actual environment.
It expands from dev phase to the entire testing phase till the staging environment.So,here goal is that our build or code is now ready to be deployed on any environment.
Staging Environment is like a production like environment and goal here is that we keep a environment exactly like a copy of our production environment so that before deploying anyrhing on the production we can check it on the pre-prod or staging environment.And also if we want to check anything instead of going to actual prod environmennt we can check it on the staging or pre- prod environment.
Continuous Deployment -Here Deployment takes place in the actual prod environment.Here along with CI and continuous delivery , we also do production deployment.So,this automated deployment to production and every change,every release that passes through all the automated test is than directly deployed to production environment.This process is not done automatically but there are organisation who do very frequent and very fast deployment.
StagesBuildTestDeployRelease
Continuous Integration ✔ (till QA phase)
Continuous Delivery ✔ (till staging environment)
Continuous Deployment ✔ (till end stage of production)

If we chain all these process through an automated trigger,it will be CI/CD Pipeline.
 
Jenkins Vs Azure DevOps

Azure DevOps is A cloud-based repository a cloud-based CI tool by Microsoft. It can be understood as a Software-as-a-Service (SaaS) platform,. It Offers a platform for containers and Kubernetes
Azure Pipelines - Azure Pipeline is used for testing, building, managing, and deploying applications. It is a cloud service that is readily available for you to build and test your code project.
Group Tasks –  allows you to perform a sequence of tasks, already defined in a pipeline, into a single task, whereas Jenkins is generally done by a single user which leads to tracking and accountability problems.
YAML Interface – With YAML in Azure Pipelines, you can configure CI/CD pipeline as code, whereas Jenkins doesn’t have a YAML interface.
Jenkins is more flexible to create and deploy complex workflows, Azure DevOps is faster to adapt. In most cases, organizations use both the tools and in such cases, Azure Pipelines supports integration with Jenkins As azure DevOps is cloud base so it Offers the latest features with frequent updates,  Gives higher customer satisfaction than jenkins or bamboo.
Does Azure DevOps have jenkins ---
Azure Pipelines supports integration with Jenkins so that you can use Jenkins for Continuous Integration (CI) while gaining several DevOps benefits from an Azure Pipelines release pipeline that deploys to Azure.
Code Migrate from jenkins to DevOps ---
In Azure DevOps project, go to Project Settings -> Service Hooks. Then select Create Subscription and choose Jenkins. Use the “Code pushed” event and set any specific filters as necessary for

Jenkins Vs Bamboo

Jenkins’ integration with Jira and Bitbucket is limited and the process requires additional components in the configuration which takes time and labour. With Bamboo, basic configuration options are already built-in. There are several plug-ins that enable Jenkins to integrate with Jira.
Jenkins has been a major open-source player for a long time and has a huge user base because of it. But Bamboo just like other Atlassian products has much more in-built capabilities and is easier to use. Jenkins is open-source, and Bamboo is a commercial CI/CD tool that can be levied against a subscription fee.
While both the tools have their own advantages, however, it ultimately depends on your project requirements, budget, and timelines to choose the CI/CD tool for your project.
Bamboo

Bamboo is an automation server used for Continuous Integration. Developed by Atlassian in 2007, this tool allows the developers to automatically build, document, integrate, test the source code and prepare an app for deployment.
Most of Bamboo software functionality is pre-built. In other words, this product doesn’t require plug-ins. When it comes to Bamboo continuous integration, it also has built-in deployment that mean it is seamlessly integrated with products such as Bitbucket and Jira.
When it comes to Bamboo vs Jenkins user-interface, Bamboo’s is tidier and more intuitive. Each time a new task is added, it provides more help and guidance through the plan’s build and deployment stages. The biggest difference between Bamboo vs Jenkins is that Jenkins is Open Source – which means it’s free