Start a Project

Getting Started with Jenkins

What is Jenkins ?

Jenkins is an opensource  automation software written in Java. Jenkins is mainly used for Continuous Integration and Continuous Delivery.

Continuous Integration

Continuous Integration is a development practice, where developers push their code to the central repository and get instant feedback of how their code works. When a developer commit some changes, a build process is triggered automatically. When the build is complete, the results are immediately sent back to the developers. In this way developers can debug their code more efficiently. Developers can exactly know which code causes the build to be failed  and change their code accordingly. It saves so much time, as you do not have to manually build the code, when everyone finishes pushing their codes to repository because build process is automated.

Continuous Delivery

Continuous Delivery is a development practice, where the codes are automatically built,tested and prepared to make release for the production. Continuous Integration is the expansion for the Continuous Integration. When the codes are successfully built, testers need to to test the code for using different test cases. The testing process can be automated by triggering a process whenever a build is made. The results of tests are immediately sent back to the testers and the developers. So developers can change their respective codes to pass the test cases. The automated process can save a lot of time.

Why Jenkins ?

Jenkins can satisfy both Continuous Integration and Continuous Delivery needs. We can integrate Jenkins with a central repository server. Jenkins can fetch data from the repository and make the build. After making the build Jenkins can run some tests on the build to check the code passes the test cases.

How to set up Jenkins in Ubuntu ?

Jenkins is written in Java. We need to install Java to start using Jenkins.

Install Java

Check if Java is installed or not

I am using apache tomcat to run jenkins.war file. First you need to install and setup apache tomcat in the server.

Download apache tomcat from http://tomcat.apache.org/

My tomcat directory is /opt/tomcat. You can use any other directory.

open your .bashrc file and add the following lines.

Make all the files inside /opt/tomact/bin executable.

go to /opt/tomcat/bin directory and run the startup script

 

Now go to url http://127.0.0.1:8080 and you will see apache tomcat home page. you can use your own IP instead of 127.0.0.1 .

Now configure apache tomcat user. Go to /opt/tomcat/conf/tomcat-user.xml and add the lines inside.

Now shutdown the service and again start the service.

Now you can deploy servlets in apache tomcat.

Download jenkins.war file from https://jenkins.io/

copy the jenkins.war file in /opt/tomcat/webapps

Now restart apache tomcat service and hit the url http://127.0.0.1:8080/jenkins.

Enter your initial admin password and go through rest of the setup process. After that you can start using Jenkins by hitting the url http://127.0.0.1:8080/jenkins. To access from other computer you need to replace localhost IP with original IP in the url. If you have any doubts regarding setting up Jenkins, you can ask me in the comment.

 

 IN CASE OF ANY QUERY,CONTACT US

 

 

Exit mobile version