Tuesday, October 25, 2016

A Step by Step Continuous Integration Configuration


A step by step continuous integration configuration using SVN, Eclipse, Jenkins, Maven & Junit


1. Subversion - SVN:

Download SVN binary package from https://subversion.apache.org/packages.html suitable to your SCM (software configuration management) server platform and install SVN.


2. Configure SVN:

Configure the SVN with repository setup, user creation & SVN workflow definition.


3. Configure SVN in Eclipse:

Configure the SVN in developer's machine through their IDE - Eclipse. SVN is configured into eclipse by installing SVN plugin and SVN connector and configuring the SVN repository.


4. Install Jenkins:

Download a configurable Jenkins download from https://jenkins.io matching your CI server platform and install Jenkins.


5. User Control in Jenkins:

Create user control in jenkins using option -> manage jenkins -> configure global security -> enable security.


6. Source Control Management in Jenkins:

Configure the source control ->Configure the source control -> SVN in jenkins using option manage jenkins -> source control management section -> Please put the SVN repository url and add credential in the relevant field to access the SVN repository -> There are two options to pull committed changes from SVN.

a) Polling SCM - Polling SCM needs to be configured in SVN settings of the Jenkins.


b) Triggering build - We need to place relevant scripts for post-commit actions in hooks directory of the SVN to trigger a build remotely into Jenkins.


7. Configure Maven in Jenkins:

Configure the build tool maven in Jenkins using option manage Jenkins –> configure system –> configure maven.


8. Automated unit testing in Jenkins:

Configure Jenkins to run Junit unit cases and publish the unit test result using option configure job –> add build set up –> add post build action of executing test scripts specifying the location of test report xmls.


9. E-mail notification in Jenkins:

Configure e-mail notification in Jenkins using option manage Jenkins –> configure system –> e-mail notification section to notify post build and post unit test results to stakeholders.


10. Automated deployment in Jenkins:

Configure automated deployment in jenkins by Installing “deploy to container” plugin using option manage Jenkins –> manage plugings, then use option configure build –> “post build actions” –> “deploy war/ear to container” -> Mention the required details of target deployment server in deploy war/ear container field of the screen.


No comments:

Post a Comment