8 Steps to Configure Jenkins to run your project and schedule it

Introduction

     Jenkins is an open source continuous integration tool written in Java.Jenkins provides continuous integration services for software development. It is a server-based system running in a servlet container such as Apache Tomcat. It supports SCM tools including AccuRev, CVS, Subversion, Git, Mercurial, Perforce, Clearcase and RTC, and can execute Apache Ant and Apache Maven based projects as well as arbitrary shell scripts and Windows batch commands. [Ref: Wikipedia]

Integrate-In-Jenkins

8 Steps to Configure Jenkins to run your project and schedule it

  1. Download Jenkins (.war file)(https://jenkins-ci.org/) and save it in C:\ drive (better to identify the java).
  1. Start Jenkins using command in command prompt (java -jar jenkins.war -httpPort=8080)
  1. Open browser and enter “localhost:8080” to access Jenkins GUI.
  1. Open Manage Jenkins section to configure the software like JDK, Maven and ANT.
    1. JDK Installation: Set the name and JAVA_HOME (Uncheck “Install Automatically”).
    2. Maven Installation: Set the name and MAVEN_HOME (Uncheck “Install Automatically”).
    3. Configure ANT: Set the name and ANT_HOME (Uncheck “Install Automatically”).
  1. Create a new project via “New Item” as “Freestyle project”.
  1. Open project then configure build section and invoke Ant.
    1. Invoke Ant: Set Ant Version and Targets. Enter targets as “clean compile run generatereport”.
    2. In Advance section: Set Build File, means set the correct path of the “build.xml” file.
  1. Click on “Build Now” link to execute the test. Access the running builds from “Build History”. Click on “Console Output” to view the execution progress or status of execution if already done.
  1. Schedule your build based on Minutes, Hours, Day, Month, and Day of the Week (0-7, where 0 and 7 are Sunday).
    1. Inside the selected project, click on “Configure” link and goes to “Build Triggers” section; then select “Build periodically” option.
    2. Enter your schedule in “Schedule” edit field. Example: “H 8 * * *” (this will schedule your build every day at 8h00). If you want to build it in every 5 minutes then mention the schedule as H/5 * * * *

enjoy your Continuous Integration

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s