This blog is about issues, solutions and thoughts related to product development. This includes tips and tricks that I have learned, solutions to problems I have faced, and other concepts I have found interesting and useful. This blog is intended to provide information to help other developers facing the same issues as well as providing me a method to document things in a well-known location for my own future reference.
Setup Jenkins Continuous and Automatic Build System
Jenkins is an open source tool which provides continuous integration services for software development. If you want to get more detail about Jenkins and it's history I would suggest refer this link. This post will help you installing and configuring Jenkins and creating jobs to trigger maven builds. Setting up Jenkins is not a rocket science indeed. In this post, I would like to concise the installation and configuration steps.
Though, there are different ways to install Jenkins. But, in this post I will be describing Jenkins installation with Apache Tomcat server. Hence, please make sure that you have Apache Tomcat.
Download Jenkins war file
from here and copy war into tomcat's
Jenkins installation is done. Wow, so easy. Isn't it?
Now you have Jenkins running with you. It's time to configure the project specific environment for continuous and automatic build. This section describes about JDK, Maven and Mail Notification configuration.
Go to 'Manage Jenkins'
Go to 'Manage Jenkins > Configure System'
Creating Job for Automatic and Continuous Build
So far you installed and configured the Jenkins. It's time to create new job. Before creating new job ensure that your project is a maven project. Now, go to 'New Job' and fill the required information. I believe, below screen shot tells everything which is required to configure a job. You just need to configure below points at minimum:
Source Code Management
Once you save the job you
will see below screen
click on 'Build Now' and see the 'Build History'. You will get new entry in
'Build History'. To see the build logs just hover the mouse on this build and click on 'Console
Output', you can see the build logs.
Congratulations! you are done with setting up continuous build system.If you want to see that how effectively it works, just check-in any file in your project and see whether your build is triggered automatically. In case, build is failed with latest checked-in changes you must get a notification mail saying build is failed.
Last but not least, you should agree with my point 'Setting up Jenkins is not a rocket science indeed'. Shouldn't you? :) :) :)