LOCATION

36/7, West Rajiv Nagar
Gurgaon, India
  +91-8431380442
  enquiry@hybridskill.com


91 Springboard
Co-working place 3rd Floor, 175 & 176,
Bannerghatta Main Rd, Dollars Colony
Bengaluru, Karnataka 560076
  +91-8431380442
  enquiry@hybridskill.com

Head Start CI/CD with Jenkins



CI is a practice in which developers integrate their code into a shared repository, usually a master repository several times a day. Continuous integration is often implemented inside by a continuous deployment part. Every code commit results in an automated build. It is desirable to save every build for automated deployment. At every point in time, Prime objective is your software should be ready for delivery. In an ideal scenario, every commit results in automated deployment. Although few organizations have such huge automation put in place which can deliver such deployment cycles. follow along to learn more about how to upgrade the software development process with CI/CD

There is much confusion about different tools available with different capacities in CI/CD pipeline. Let us first see tools available for different stages of a CI/CD  pipeline.

Source Code Management(SCM): Github, Bitbucket

Automated Build: Maven, GNU make, Gradle, Ant

Automated testing: Selenium, Testcomplete, Cucumber

Central CI/CD server: Jenkins, Teamcity, Bamboo, CircleCI

If Automation is train Jenkins is Engine

Jenkins is the most popular CI/CD tool available for Continuous integration and continuous deployment. Jenkins is a central CI/CD tool in creating a CI/CD pipeline. It connects automated testing, automated build, and Continuous integration stages in one place. In other words it a cockpit of CI/CD ship. Jenkins is the most used, most popular CI/CD server, more than 70% of organizations use Jenkins as their central CI/CD server. Having such popularity we can say Jenkins is the driving force of Automation and DevOps in the Software development industry. Jenkins is written in Java, Due to which it is platform-independent. Jenkins offers a one-stop solution for build automation across the Unix and Windows platform. It helps an organization to be more flexible in choosing their choice of language for software development.



Jenkins is been around since the early years of CI/CD. It is backed by a strong open source community. Jenkins is developed to take care of every phase of the CI/CD lifecycle. Jenkins has a rich dashboard design for users to get started with Jenkins. It has deeply integrated with almost every popular technology used by the IT industry. Jenkins has a plugin integration design. Plugin integration design has its advantages and disadvantages. One biggest disadvantage with plugins is that it is not very stable. Some plugins may misbehave after the update. But such problems can be avoided by following good practices of Deployment.

Why Jenkins is a champion choice


Jenkins provides a feature-rich GUI for new users. Although often in advance stages of CI/CD you will find yourself writing Jenkinsfiles. For large scale infrastructure, it is very important to put Jenkinsfile in SCM for later maintenance. Both DSL and Scripting has its advantages and disadvantages. Jenkins initially came up with only Groovy scripting for creating complex pipelines. It is still the most powerful way for creating complex pipelines.DSL stands for Declarative language syntax. It is introduced as an alternative for Groovy language. It is relatively easy than Groovy and the most popular way of creating automated pipelines in Jenkins. Before diving deeper into Jenkins lets first see how to install Jenkins

Installation of Jenkins


Jenkins package is available for the following platform

MAC

Windows

Linux/Unix

Docker

WAR file

The easiest way of installing Jenkins is by  WAR file. It only requires java pre-installed on your system. The most modern system comes Java pre-installed already. Here I am assuming you already have java installed on your system.

wget http://mirrors.jenkins.io/war-stable/latest/jenkins.war

java -jar jenkins.war

Post Installation steps:

Open your browser and open below URL

http://localhost:8080

AN automated password is generated during the installation of a WAR file. Copy that and paste here. Same password is also available on local system at /var/jenkins_home/secrets/intialAdminPassword

Now Jenkins will ask to create an admin user. Fill required fields

You can install and uninstall plugins at any point in time. Just install suggested plugins here.

Now Our Jenkins instance is installed on the system

Jenkins is very easy to start using for beginners. Very precise and straight forward documentation is available by cloud bees. To help you get started with production-ready Jenkins concepts. In the coming posts, I will touch upon the advanced topics of Jenkins. Get your Jenkins instance ready. We will see how to implement production level CI/CD pipelines. I will also discuss best practices to maintain a Jenkins server.



Article by Anthony Rozario


Leave a Reply