Jenkins Tutorial

Jenkins Tutorial

A Guide to Start with Jenkins

Author’s Bio

Author XYZ is a passionate software wizard and well-known professional of Jenkins. He has a lot of experience of working with many companies and also run online courses related to Jenkins. He has several best- selling courses at Udemy and has many students around the world.

Table of Contents

TitlePg No.
Brief Introduction and History of Jenkins1
Introduction1
Why Jenkins?1
Brief History1
What is CI or Continuous Integration?1
Jenkins Architecture and important Jenkins terms1
Jenkins Architecture1
Important Jenkins terminologies1
Installation of Java1
Java _Home environment variable2
Download Jenkins2
Accessing Jenkins2
Overview of Jenkins UI3
Dashboard Menus3
Creation of first Jenkins Job3
Running first Jenkins Job3
Installation of Git and GitHub plugin3
Installation of Maven on local box4
What does Maven do?4
Installation4
Configure Jenkins to Work with Java, Git and Maven4
Creation of first Jenkins Based Maven Project4
Structure of Maven Project4
Running first Jenkins Build and Jenkins Workspace5
Source Control Polling in Jenkins5
Cron Syntax5

Brief Introduction and History of Jenkins

Introduction

Jenkins (written in Java) is a continuous integration server. It can handle any type of build or continuous integration. It is used by different teams of different sizes for those projects that may have heterogeneous languages (Java, .net, php etc.)

Why Jenkins?

Jenkins is very popular because of the following reasons:

  1. Easy to use

Jenkins has a relatively low learning curve. It is flexible and easy to adapt.

  1. Great Extensibility

It provides a wide range of plugins that help to support different version control systems, code quality metrics and provide UI customization.

Brief History

Hudson was started in 2004 by Kohsuke Kawaguchi at Sun Micro Systems. It was started as a hobby project. Hudson was first officially released in 2005. As more and more teams adapted Hudson for their own projects at Sun Micro Systems so Kohsuke worked on Hudson full time in 2008 after seeing its popularity. Because of professional services and support, Hudson became the leading CI solution with a market share of over 70% in 2010. In Jan 2011, Hudson was renamed as Jenkins.

What is CI or Continuous Integration?

A continuous integration is the practice of running tests on non-developer machine automatically every time when new code is pushed into source repository. It helps to remove problem of finding later occurrence of issues. CI demands frequent build from developers. Build should be triggered whenever a code commits occur.

Jenkins Architecture and important Jenkins terms

Jenkins Architecture

Jenkins follows a master and slave architecture to manage distributed jobs. Master not only schedules build jobs but also dispatches build to the slaves for actual job execution. Slave is a small Java program that listens to the requests from Jenkins master and executes build jobs. Following figure show the architecture diagram:

Important Jenkins terminologies

  • Job/ Project: Both refer to runnable tasks that are monitored by Jenkins
  • Slave: A computer that builds projects for master
  • Node: Node includes all the machines that are part of Jenkins grid
  • Executor: A node may have many executors. It is a separate stream of builds to be run on a node parallel
  • Build: Result of one of the projects
  • Plugin: A piece of software that extends core functionality of core Jenkins server.

Installation of Java

Jenkins requires minimum Java 7 to be installed. It is also recommended to install Java 8. First, check if Java is installed on your laptop. You can install Java on your local laptop by writing following command.

If Java is already installed then above command will tell which version of Java you are currently using.

If you don’t have Java installed or your version of Java is older than 7, lets install Java first. (Note: If Java is already installed then ignore these steps)

Go to Google and write ‘Install Java se’. The third web link is the official site to download Oracle Java Development Kit. Just click the link.

On the official website of Java, click on ‘Accept License Agreement’.

Now choose the matching platform that you are using on your local laptop. Once installer has downloaded, just run the installer and accept all defaults. Now the download is complete.

LEARN HOW TO GET STARTED WITH DEVOPS

get free access to this free guide, downloaded over 200,00 times !

You have Successfully Subscribed!

Level Up Big Data Pdf Book

LEARN HOW TO GET STARTED WITH BIG DATA

get free access to this free guide, downloaded over 200,00 times !

You have Successfully Subscribed!

Jenkins Level Up

Get started with Jenkins!!!

get free access to this free guide, downloaded over 200,00 times !

You have Successfully Subscribed!