Thursday, September 26, 2013

Jenkins Setup in Local machine

Jenkins Setup in Local machine

Jenkins is an award winning application that monitors executions of repeated jobs, such as building a software project or jobs run by cron.

 Steps to install Jenkins in local machine

      ·         Download Apache Tomcat 7.0.x stable version and install it on.
      ·         Download latest Jenkins war file from or install Jenkins as a service in             windows machine from here.
      ·         Deploy Jenkins.war file in tomcat webapps folder
      ·         Once deployed then start tomcat server. If you are using Jenkins as a service then you have to         just start service from service window. No need to deploy Jenkins.war file
      ·         Once sever started then open browser and hit http://localhost:8080/jenkins/
      ·         Now configure JDK and ANT which can be used to build project.
        For that you have to click on Manage Jenkins >> Configure System

        ·         Now Provide your JDK and ANT or MAVEN path as shown below

        ·         Download File System SCM from here. Then go to Manage Jenkins >> Manage Plugins                 section. Click on “Advanced” tab, where you will find one section called “Upload Plugin”.             Click on “Browse” and find the downloaded “filesystem_scm.hpi” and Click on “Upload”               button. Restart the server. You will find the newly added plugin under “Installed” tab as                 shows below.

  This plugin is useful to read code from the File System. If you want to read code from SVN or other repository, then you may have to install more related plugins.

       ·     Now create a new job to configure the project and for that follow below steps.
§  Click on New Job link from left navigation
§  Give the name if job and select appropriate options. Here we will select “Build a free-style software project”. Give proper job name and click on “OK”

§  Then locate the project source. Here we are using file system as we configure for local system.

§  If you want that your build script will run on some interval then configure scheduler as shown below. This example shows that it will run on 11PM every day.

§  Configure the target which you want to run (Click on Add build step >> Invoke Ant).

§  Click on Save Job.

         ·         Now you can build the project or job manually by clicking on “Build Now” link.  During                build if you want to check logs then Click on the progress bar that is shown on left side                  while build is in process. It will redirect you to “Console Output” page. Here you can see                logs.
         ·         Also the build will be automatically triggered as per scheduler configuration.

Congratulation! It’s done.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.