Jenkins, formerly known as Hudson, is a quick to use continuous integration system, which can be used to automate the build of your projects at a scheduled time or when a trigger is raised (e.g. a CVS/SVN commit) or simply when the user requests it. The automated, continuous build can help a lot in increasing the productivity and reducing conflicts.
Besides this, Jenkins can also monitor the execution of external jobs, such as cron jobs etc, even those that run on a remote machine.
- Cron Job Scheduling (At what time we want to run the job)
- We can execute multiple jobs simultaneously
- We can configure e-mail notifications
- We can execute one job after another by making a pipeline
Calsoft Whitepaper: A Comparison of Two Approaches to Build Reliable Distributed File Server
What is Continuous Integration(CI)?
Continuous Integration (CI) is a development practice that requires developers to integrate code into a shared repository several times a day. Each check-in is then verified by an automated build, allowing teams to detect problems early.
Continuous Integration (CI) is such that, after each and every commit we don’t need to have a manual intervention of running the code or keeping a track of its correct functioning.
Fig:- Continuous Integration System
CI – Benefits
- Immediate bug detection
- No integration step in the lifecycle
- A deployable system at any given point
- Record of evolution of the project
- Generate a (JSON/HTML) Report after specific Run
Installing and Configuring Jenkins:
There are two ways of installing Jenkins:
- As a Standalone Application
- As a Service
Installing Jenkins as a Standalone Application
Download Jenkins Web archive from http://jenkins-ci.org/
Native/Supported packages exist for:-
- Mac OS X
Installing Jenkins as a standalone application for windows:-
The Web archive can be either executed as a Java application by running:
-Go to the Location of Jenkins.war file through command prompt and execute the below command:-
java -jar jenkins.war
The above command will start a Java application listening by default on port 8080. (This can be changed passing the –httpPort=$HTTP_PORT parameter to the java interpreter):
2. You can log into the Jenkins console by pointing your browser at http://localhost:8080 or http://Jenkins host IP:8080 (e.g : 192.168.1.1:8080)
From the Home page, click on the “Manage Jenkins” link:
From there, you can access to a wide set of options which will let you configure (and update too using plugins) your Jenkins configurations. As first step, we will need to enter the location for our JDK installation and our Maven home. Click on the Configure System link:
You will be taken to the Configuration panel. From there, click on Add JDK. If you have an available JDK on your system, uncheck the “Install automatically” option and enter your JAVA_HOME:
Perform the same steps for configuring Maven: click on Add Maven. If you have an available Maven installation on your system uncheck the “Install automatically” option and enter your Maven Home:
Important Plugins that are available in Jenkins:
From the Home page, click on the “Manage Jenkins” >”Manage Plugins”, from their we can install the Plugins. Few of the important Plugins are listed below
● GitHub plugin
● Build Pipeline Plugin
● Cucumber json test reporting.
Installing Jenkins as a Service
Execute the below command in command prompt to start jenkins as Service:
java -jar <path of the jenkins.war file> –httpPort=<port number>
e.g. :- java -jar C:Program Files (x86)Jenkinsjenkins.war –httpPort=8083
After executing the command we can access the jenkins by pointing the browser to http://localhost:<port number> or http://Jenkins host IP:<port number>
Creating a New Job in Jenkins:
From the left menu select “New Job or New Item”, enter a Name for it and select “Freestyle project”
- Add the VCS(Versioning Control System) Details
- Add the commands in “Execute Windows batch command” option (If there are any):
- Save the Job/Project.
- To Run the Job/Project. > Go to that project and Click on ‘Build Now’ option.
Build Pipeline View Configuration
- Click on Ok
To know more email: email@example.com
Calsoft DevOps Expertise
Calsoft has in-depth expertise in almost all globally used DevOps tools and technologies. Our DevOps consultants assist our customers in their release and deployment processes by consulting and using best DevOps practices and implementation methodology to produce increased speed, efficiency, better quality and reduced cost.
Latest posts by Calsoft Inc (see all)
- Computex 2017: Where Technology Innovations Converge - May 24, 2017
- Dell EMC World 2017 - April 24, 2017
- Big Data Innovation Summit 2017 - April 3, 2017