Continuous Integration (CI) with Jenkins

Introduction

The first question that we need to answer is what is ‘Continuous Integration’?. According to TechTarget “Continuous integration (CI) is a software engineering practice in which isolated changes are immediately tested and reported on when they are added to a larger code base. The goal of CI is to provide rapid feedback so that if a defect is introduced into the code base, it can be identified and corrected as soon as possible. Continuous integration software tools can be used to automate the testing and build a document trail. Jenkins is an open source continuous integration tool”. Since Jenkins has MIT licence it can be used for free in commercial environments as well, which is the most advantageous with regard to other CI tools available in the market.

To know more about Jenkins you can visit their website from here. All the things that are need to know about this CI tool is specified there. So lets continue with our first topic. How to install this tool in to your production server. First we need to download Jenkins. Visit http://jenkins-ci.org/ to download Jenkins. (Jenkins is available for all major OS platforms Windows, Mac, Linux)

How to install

Ok, now we have installed Jenkins in the machine. But before we start using continuous integration there are some configurations that are need to be done.

Setting up Jenkins

After installation Jenkins would run on your default browser path http://localhost:8080/. Here the port can be changed if you have another application already taken 8080 port or you are thinking of using 8080 port in the future.

Change Jenkins Port

Before we add a new project to Jenkins there are some configurations needed to be done. First we need to add git support to the Jenkins. Before adding it to the Jenkins we have to install git in our machine and then configure it on jenkins.

After adding git support next we need to add MSBuild plugin which will help Jenkins to build the project.

After installing all the prerequisites now we can configure our project with Jenkins. Ok so now we are going to create our first job.

To create a new project

And now in Configuration page go to Source Code Management section.

And now you have configured your project with Jenkins..

Associate Tech Lead | AWS Community Builder from Sri Lanka currently working in Singapore.